cancel
Showing results for 
Search instead for 
Did you mean: 

vscode debug Global variables issue

dqsh06
Senior

Hello,

I have a question about vscode with STM32 extension. I have setup a project with vscode and stm32 extension, and after compiler, it can do debug, and I can see the Global Variables on the VARIABLES window. as below

dqsh06_0-1741858938092.png

but when I use vscode to do another design not with stm32 extension. I do the debug, but I cannot see the Global Variables on the VARIABLES window. as below, only Locals and Registers.

dqsh06_1-1741859152059.png

Why no Global Variables? what is the difference among the 2 vscode?

Thanks.

 

1 ACCEPTED SOLUTION

Accepted Solutions
BigApple
Associate

VSCode likely has the Cortex-Debug extension installed.  The Cortex-Debug extension can sometimes get installed through other MCU vendor extensions as well.  That extension gives you the Globals and the Static variables (main.c) during debug.  Some of the JSON files may need to be updated to debug using the extension.

View solution in original post

1 REPLY 1
BigApple
Associate

VSCode likely has the Cortex-Debug extension installed.  The Cortex-Debug extension can sometimes get installed through other MCU vendor extensions as well.  That extension gives you the Globals and the Static variables (main.c) during debug.  Some of the JSON files may need to be updated to debug using the extension.