Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

enter image description here

why and how to fix?

like image 208
Dims Avatar asked Nov 23 '25 13:11

Dims


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
like image 170
Suraj Subudhi Avatar answered Nov 25 '25 09:11

Suraj Subudhi