13.1.8 Debug Menu

Below are the menu items in the Debug menu.

For keyboard shortcuts of some of these menu items, see Help > Keyboard Shortcuts Card.

Table 13-8. Debug Menu Options
CommandAction
Debug1Debugs the main or selected project.
Discrete Debugger
 OperationPerform the following debug operations one step at a time (discretely.) This is useful for changing the Memory window setting during debug and using starter kits.
  1. Build for Debugging (build with debug executive).
  2. Program Device for Debugging (program with debug build).
  3. Launch Debugger.

If the target is running, you can use:

Finish Debugger SessionEnds the debugging session.
PausePauses debugging – use Continue to resume.
ContinueResumes debugging after Pause until the next breakpoint or the end of the program is reached.
Step OverExecutes one source line of a program. If the line is a function call, executes the entire function and then stops.
Step IntoExecutes one source line of a program. 
If the line is a function call, it executes the program up to the function’s first statement and then stops.
Step OutExecutes one source line of a program.
 Finishes execution of the current function and stops on the source line immediately following the call to that function.
Step InstructionExecutes one machine instruction
If the instruction is a function call, it executes the function and returns control to the caller.
Run to CursorRuns the current project to the cursor’s location in the file and stop program execution.
ResetResets the device.
Set PC at cursorSets the program counter (PC) value to the line address of the cursor.
Focus Cursor at PCMoves the cursor to the current PC address and centers this address in the window.
Stack > Make Callee CurrentMakes the method being called the current call
. Only available when a call is selected in the Call Stack window.
Stack > Make Caller CurrentMakes the calling method the current call. 
Only available when a call is selected in the Call Stack window.
Stack > Pop Topmost CallPops the call on top of the stack.
Stack > Pop To Current Stack FramePops the current stack from the top of the stack.
Stack > Pop Last Debugger CallPops the last call from the debug tool from the top of stack.
Toggle Line BreakpointAdds a line breakpoint or removes the breakpoint at the cursor location in the program.
New BreakpointSets a new breakpoint at the specified line, exception, or method.
New WatchAdds the specified symbol to watch.
New Run Time WatchAdds the specified symbol to watch that will change value as the program runs/executes.
Disconnect from Debug ToolDisconnects communications between MPLAB X IDE and the debug tool. 
To reconnect, either Run or Debug.
Run Debugger/Programmer Self TestPerforms a debug tool self-test. 
For tools that support a self test, follow the tool documentation to set up the hardware and then run this test to confirm proper operation.
Hardware Tool Emergency Boot Firmware RecoveryRun utility to restore hardware tool boot firmware to its factory state. See MPLAB ICE x, MPLAB ICD x or MPLAB PICkit x documentation for details, where x = 4 or 5.
  1. If project selected, command followed by “Project Project Name”. If project set as main, command followed by “Main Project”.