The Debugging View appears when you start debugging an application. The following are Views found in the Sidebar while debugging and a brief description of how to use them.
To read more about each debugging View that is not exclusive to nRF Debug, see the VS Code debugging documentation.
The Variables View shows variables in the current scope and organizes them into local, global, and static sections.
The Watch View shows the output of variables you have selected to watch.
To start watching a variable:
- Click and drag the mouse cursor to highlight the variable in your code.
- Right-click and choose Add to Watch.
- Click the Start/Continue button in the debugging control bar to watch the debugger go through the code until it stops at a variable breakpoint. The output of the code displays in the Watch View.
The Call Stack lists all of the available threads and indicates which ones are running. It also includes the call stack for each thread that is running.
When in the debugging mode, you can click on the left side of any line of code in the Editor to set or remove a breaking point.
All breakpoints that you have set in the code will be listed in the Breakpoints View.
The Peripherals View shows a memory map of peripherals from your device's SVD file and displays the values of their registers and fields. This View is unique to the extension's debugger nRF Debug.
When registers and fields are writable, a pencil icon appears to the right when you hover over their entry in the peripheral tree. Click on this icon to open an input box to enter a value that will be saved to the register. For fields with predefined enums, a list of available options opens from a quick-pick menu at the top of the window.