microsoft / vscode-cpptools

Official repository for the Microsoft C/C++ extension for VS Code.
Other
5.45k stars 1.53k forks source link

[cppvsdbg] Allow debugger commands to be sent to the Visual C++ debugger using `-exec` #2600

Open jyavenard opened 5 years ago

jyavenard commented 5 years ago

Type: Debugger Input information below

Please review existing issues and our documentation at https://github.com/Microsoft/vscode-cpptools/tree/master/Documentation prior to filing an issue.

Describe the bug

To Reproduce Please include a code sample and launch.json configuration. Steps to reproduce the behavior:

Run a program under debugger in VS Code When a program crash, the debugger stop.

Despite multiple attempts at finding some documentation, I've found myself unable to find a way to print the backtrace (useful to report a bug)

On Linux/macOS, I would have typed bt. But on Windows nothing appears to work.

pieandcakes commented 5 years ago

@jyavenard Are you using gdb or the Visual C++ debugger?

When the program crashes, the stack trace should show up in the Stack window. Is that not happening?

jyavenard commented 5 years ago

I'm on windows, this is with the "cppvsdbg". Yes, I see the trace on the left hand side under the "call stack" section.

But I can't do any copy/paste here.

Typically typing bt in the debug console would print the backtrace as it does with all other platforms (macOS or Linux).

Accessing the full backtrace and being able to copy it is necessary to report bugs properly

pieandcakes commented 5 years ago

@jyavenard There is not a way currently to mimic that behavior. I will update the title of this issue and mark it as a feature request.

It sounds like your underlying issue is that the callstack window does not allow copy/paste. You can try and add a feature request with VS Code to allow copy/paste here.

jyavenard commented 5 years ago

Copying the content of the stack on the left wouldn't provide the same amount of details of what bt full would provide in lldb/gdb or the vsdb debugger in visual studio 2017 would. Having the ability to dump the full stack trace is an essential feature of a debugger.

It's unfortunate that on Windows, of all platform the c++ debugger is lacking such feature (and many others)