question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] Unable to see variable values while debugging C++ node

See original GitHub issue

(Please add appropriate labels)

  • Windows 10, Windows Subsystem for Linux (Ubuntu 20.04)
  • Noetic

<Version of the plugin> 0.6.6

<Copy the Version information from the Help | About menu> image

what is the bug

I’m unable to see the values of variables in debug mode

Repro steps

<how to reproduce the bug. Please attach sample files or github repo if appropriate.>

  1. Try to debug the simple hello_world code from the VS Code tutorials: https://code.visualstudio.com/docs/cpp/config-linux
  2. Instead of seeing what’s contained in the vector, like shown in the link below, I see something like this: image

expected behavior

What I would expect to happen is that I would see the values contained within the msg vector, as shown in this section of the tutorial: https://code.visualstudio.com/docs/cpp/config-linux#_step-through-the-code

additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Hypothesis-Zcommented, Jun 16, 2021

@ooeygui I’m not a typescript programmer. Anyway, I guess appending a property setupCommands to the configuration may work.

"setupCommands": [
    {
        "description": "Enable pretty-printing for gdb",
        "text": "-enable-pretty-printing",
        "ignoreFailures": true
    }
]

https://github.com/ms-iot/vscode-ros/blob/d56efda20b054cb2f1dc6e0a19e89ebf9bd0553f/src/debugger/configuration/resolvers/ros1/launch.ts#L275-L284

0reactions
ooeyguicommented, Jun 16, 2021

Awesome!!! Thank you for the pointer, I’ll take a look in the next batch of vscode work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS2017 15.9.4 debugger still not showing variable values on ...
Just to be clear, this is a problem while debugging. It shows info when not debugging. Although, I have seen this fail when...
Read more >
Variable does not exist in the current context while ...
Clearly a bug in VS! To say it again: If you don't see Variable content on mouse hover or under Watch/Locals, search in...
Read more >
Tips and tricks in the debugger - Visual Studio (Windows)
It's easy to view variables using debugger windows like the Watch window. However, when a variable goes out of scope in the Watch...
Read more >
Diagnosing and resolving bugs in your running app
Look at your variables and confirm they have the values you expect. ... Your Swift code can receive an Objective-C exception when it...
Read more >
Error Debugging in C++ with VS Code
When supported data breakpoints are added from the variable view in the debug menu, these breakpoints will be triggered when the value of...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found