How to force "Debug Console" in vscode to accept gdb commands?

Viewed 849

I am trying to issue some gdb commands in vscode's Debug Console, but fail

enter image description here

why and how to fix?

1 Answers

From the Visual Studio Code official page:

For the C++ (GDB/LLDB) debugging environment, you can execute GDB, LLDB and LLDB-MI commands directly through the debug console with the -exec command, but be careful, executing commands directly in the debug console is untested and might crash VS Code in some cases.

E.g. for debugging child process after fork:

-exec set follow-fork-mode child
Related