4.7.1.1 Start and Stop Debugging

To debug an application in MPLAB for VS Code, you must create a project containing your source code so that the code may be built, programmed into your device, and executed.

Click on to start Run and Debug. If you do not have a launch.json file, you may be asked if you want to create one. Then proceed to launch the project. You should see a Debug Toolbar with controls shown below.

Table 4-4. Debug Toolbar
Execute project code in debug mode.
Pause or halt code execution.
Continue code execution after a pause or halt.
For paused/halted code, Step Into or execute one instruction. Be careful not to step into a Sleep instruction or you will have to perform a Reset Device to resume emulation.
For paused/halted code, Step Over an instruction.
For paused/halted code, Step Out of an instruction
Finish the debug session, which ends code execution.
Restart code execution.
Reset device