Skip to main content
Senior
Mar 13, 2025 9:49 AM UTC
Solved

vscode debug Global variables issue

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.

 

BigAppleBest answer
Visitor II
Jan 26, 2026 10:35 PM UTC

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.

1 reply

BigAppleBest answer
Visitor II
Jan 26, 2026 10:35 PM UTC

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.