Skip to main content
Senior
March 13, 2025
Solved

vscode debug Global variables issue

  • March 13, 2025
  • 1 reply
  • 2212 views

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.

 

Best answer by BigApple

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
January 26, 2026

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.