Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Global variables not showing up in "Variables" tab while debugging #13568

Unanswered
npdhere asked this question in Q&A
Discussion options

Hi there,

My setup:
Am using C/C++ for Visual Studio Code (version 1.25.3) and OpenOCD (0.12.0) and JLink for debugging and am enabling the debugging using launch configs and setup commands. Attaching my configs here:

 const debugConfig = {
 name: "(gdb) Launch",
 type: "cppdbg",
 request: "launch",
 program: elfFilePath,
 showGlobalVariables: true,
 cwd: "${workspaceFolder}",
 windows: {
 MIMode: "gdb",
 miDebuggerPath
 },
 linux: {
 MIMode: "gdb",
 miDebuggerPath
 },
 targetArchitecture: "arm",
 console: "integratedTerminal",
 hardwareBreakpoints: {
 "require": true,
 "limit": 30
 },
 symbolLoadInfo: {
 "loadAll": true,
 "exceptionList": ""
 },
 stopAtEntry: true,
 setupCommands: [
 { text: "target extended-remote :3333" },
 { text: "file filepath.elf" },
 { text: "monitor reset init"},
 { text: "monitor halt"},
 { text: "load" },
 { text: "set breakpoint auto-hw on" },
 { text: "monitor arm semihosting enable"},
 { text: "-enable-pretty-printing" },
 { text: "set print pretty on" },
 { text: "hbreak main" },
 ], 
 rtos: "FreeRTOS",
 servertype: "jlink",
 logging: {
 engineLogging: false,
 trace: false,
 traceResponse: false,
 programOutput: true
 }
 };

When pausing the debugger, I could see the local variables and registers but could not see global variables. I tried showGlobalVariables: true, doesnt worked. I could track a sepcific variable by adding it to watch, but I need to view all the global variables like we do for locals. Is there any command to enable this?

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /