microsoft / vscode-cpptools

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

[Feature Request][gdb] Support Multiline commands #4454

Open pieandcakes opened 5 years ago

pieandcakes commented 5 years ago

Type: Debugger

Request for support for user entered multiline commands in the debugConsole.

Please see this issue: https://github.com/microsoft/vscode-cpptools/issues/3666#issuecomment-543148969

mads-bn commented 1 year ago

I use this workaround: 1) create a TEXT_FILE with the required gdb multi-line commands 2) in "debug console": source TEXT_FILE

Ver: Ubuntu, vscode 1.74.2, Cortex-Debug: version 1.6.9 git(4c381ef). https://github.com/Marus/cortex-debug#usage Example to set up backtrace+continue when breakpoint hit:

gdb: info break
Num     Type           Disp Enb Address    What
1       breakpoint     keep y   0x000026d8 in foo at foo.c:24
shell: printf "commands 1\nbt\nc\nend\n" >test.gdb
gdb: source test.gdb
mrx23dot commented 3 months ago

This could break a lot of things if VScode uses the same pipe to communicate with gdb.