Debug Menu

Below are the menu items in the Debug menu.
Table 1. Debug Menu Options
Command Action
Debug Project Debugs the main or selected project.
Discrete Debugger
Operation Performs the following debug operations one step at a time (discretely):
  • Build for Debugging (build with debug executive).
  • Program Device for Debugging (program with debug build).
  • Launch Debugger.
  • Live Connect Debug.

This is useful for changing the Memory window setting during debug and using starter kits.

Finish Debugger Session Ends the debugging session.
Pause Pauses debugging – use “Continue” to resume.
Continue Resumes debugging after “Pause” until the next breakpoint or the end of the program is reached.
Step Over Executes one source line of a program
. If the line is a function call, executes the entire function and then stops.
Step Into Executes 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 Out Executes 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 Instruction Executes one machine instruction
If the instruction is a function call, it executes the function and returns control to the caller.
Run to Cursor Runs the current project to the cursor’s location in the file and stop program execution.
Reset Resets the device.
Set PC at cursor Sets the program counter (PC) value to the line address of the cursor.
Focus Cursor at PC Moves the cursor to the current PC address and centers this address in the window.
Stack>Make Callee Current Makes the method being called the current call
. Only available when a call is selected in the Call Stack window.
Stack>Make Caller Current Makes the calling method the current call. 
Only available when a call is selected in the Call Stack window.
Stack>Pop Topmost Call Pops the call on top of the stack.
Stack>Pop To Current Stack Frame Pops the current stack from to the top of the stack.
Stack>Pop Last Debugger Call Pops the last call from the debug tool to the top of stack.
Toggle Line Breakpoint Adds a line breakpoint or removes the breakpoint at the cursor location in the program.
New Breakpoint Sets a new breakpoint at the specified line, exception, or method.
New Watch Adds the specified symbol to watch.
New Run Time Watch Adds the specified symbol to watch that will change value as the program runs/executes.
Disconnect from Debug Tool Disconnects communications between MPLAB® X IDE and the debug tool 
To reconnect, either Run or Debug.
Run Debugger/Programmer Self Test Performs 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 Recovery Run utility to restore hardware tool boot firmware to its factory state. See MPLAB ICD 4 or PICkit 4 Help for details.