User manual
UM0036 Basic debugging features
Doc ID 7705 Rev 11 167/385
5.3 Running an application
An application loaded into the STVD may be run using the commands available in the
Debug menu. In the debugging process, commands in the Edit menu and the Editor's
contextual menu are also frequently used.
Typically, the source code for the loaded program will be viewed in an Editor window during
debugging. Breakpoints may be set and removed, and run commands issued from within the
Editor window.
For this reason, most commands associated with the debugging process are available in the
Edit menu and/or the Editor's contextual menu (to obtain the contextual menu, right-click
anywhere within an Editor window). Use of the Editor during debugging is detailed in
Section 5.4: Editor debug actions on page 169.
This section provides information about running your application in the debug context,
including:
● Run commands
● Stepping modes
● Program and STVD status bar display
● Monitoring execution in source windows
5.3.1 Run commands
The commands available in the Debug menu and on the Debug toolbar are listed in
Table 60 .
Table 60. Debug menu run commands
Command Description
Start Debugging
Start a debugging session. In order to start a debug session, you must have built your
application into an executable, specified a debug instrument that supports the application’s
target MCU and specified the connection port for the debug instrument.
Stop Debugging
End the debugging session. You cannot build your application or change the target MCU
while a debugging session is open.
Go to PC (Program
Counter)
The program information displayed in the STVD windows is modified to show the program
environment and values as they should be at the current source code statement pointed to
by the PC. This command may be used to retrieve the current source code statements after
having scrolled in the source file, or after changing source file viewing.
Run Resets the microcontroller and executes the application.
Restart
Resets the PC to first instruction of the main function for applications in C language. For
applications in Assembly, the PC is set to the first instruction of the function labelled main, if
one exists.
Chip Reset Resets the microcontroller. The PC is reset to the beginning of the startup routine.
Continue
Continues execution of the application from the position at which it is halted. When execution
has stopped at a breakpoint, it will be continued from the following instruction (as if no break
occurred).
Stop Stops program execution.
Step Into, Step Over, Step Out: These three commands permit enhanced control of single-stepping. Each
provides a different single-step operation.