VS Code: Debugging

We have a project imported, have built it, time to debug it on the hardware.

Debugging with VS Code

The ‘Debug Probes’ sections shows me the currently connected debug probes:

Debug Probes listed

To debug a project, I click on the ‘debug’ Icon (triangle) of the the project:

Debug action for project

In the case of having multiple probes attached, it asks for the one to be used:

Choosing the debug probe

Should I decide later to use a different debug probe, I can reset the probe selection:

Reset probe selection

Another way to debug to debug the project is using the context menu. From there I can as well erase the flash, program the device without debug and reset the probe selection if needed:

After a few seconds, I can debug my application on the board:

A small toolbar is used for continue, step over, step into, step out, restart and stop debugging:

Debug toolbar

Local variables and registers are shown on the left:

Just below that, there is the view for the call-stack:

Breakpoints are set on a source line. Either directly clicking on the left of the line number, or using the context menu which offers additional breakpoint types:

Source with breakpoints

The breakpoints view is used to manage all the breakpoints:

Breakpoints

With this, I can flash my application and debug it.

So far I have used projects and devices supported with the NXP MCUXpresso SDK 2.13. My next article shows how to deal with SDKs which only have on older SDK.

Happy debugging 🙂

Links

2 thoughts on “VS Code: Debugging

  1. Hi,
    Nice article . I’m trying to find rebuild and restart . Have you found a way to do that ?.It would be great to make an article on ARM extensions on VSCODE . Specially the CLANG compiler . First time i see such lack of information .
    Thanks again for all your work,

    Like

Leave a reply to Erich Styger Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.