Using the debugger

The Debug perspective of S32 Design Studio provides several toolbar buttons to let you manage active debug sessions. These buttons are available when a debug session is on.


Debugging toolbar

Also, some debugging options are available from the editor area.

The following table describes all debugging options available to you when a debug session is on:

Table 1. Debugging options
Action Button Steps
Skip all breakpoints (Skip All Breakpoints) Click Run > Skip All Breakpoints or click (Skip All Breakpoints) on the toolbar.
Resume execution of the currently suspended thread (Resume) Click Run > Resume or click (Resume) on the toolbar.
Suspend execution of the currently selected thread (Suspend) Click Run > Suspend or click (Suspend) on the toolbar.
Stop execution of the currently selected debug session and/or process (Terminate) Click Run > Terminate or click (Terminate) on the toolbar.
Break the GDB connection (Disconnect) Click Run > Disconnect or click (Disconnect) on the toolbar.
Step into the routine call (Step Into) Click Run > Step Into, or click (Step Into) on the toolbar.

The current statement is executed; then the current statement arrow moves to the next statement and stops. If the routine call is executed, then execution jumps to the first statement in that routine. It the last statement in the routine call is executed, then execution jumps to the next statement in the calling routine.

Step over the routine call (Step Over) Click Run > Step Over, or click (Step Over) on the toolbar.

The current statement or routine executes; then program execution stops. If the current statement is a routine call, execution stops at the next breakpoint (watchpoint, eventpoint) or when the routine is finished.

Step out of the routine call (Step Return) Click Run > Step Return, or click (Step Return) on the toolbar.

The rest of the current routine executes; then execution returns up the call chain and stops.

Enable/disable the Instruction Stepping mode (Instruction Stepping Mode) Use the Instruction Stepping mode to step through instructions in the Disassembly view rather than through the source code in the editor.

To enable/disable the Instruction Stepping mode, toggle the (Instruction Stepping Mode) button on the toolbar.

Set a breakpoint () at the line of code   To halt execution of a statement, double-click the marker bar (the vertical ruler in the editor) in front of the statement. Or, right-click the marker bar and click Toggle Breakpoint.
Note: The "No source file named..." warning appears in the Debugger Console view when you set breakpoints at similar function names in different projects. This is a known issue of Eclipse. This issue has no impact on the debug session and can be ignored.
Enable/disable a breakpoint   Right-click an active breakpoint () and click Disable Breakpoint from the context menu, or right-click a disabled breakpoint () and click Enable Breakpoint.
Remove a breakpoint   Double-click the breakpoint ( or ).
Set the program counter   To continue execution from a certain line of code, right-click that line in the editor, then click Move To Line from the context menu.
Note: Changing the program counter may cause your program to malfunction.
Restart execution of the program   Right-click the thread in the Debug view and click Relaunch from the context menu.
Note: Relaunch is considerably faster to restart a debug session as it skips over loading debug information and register descriptors.