Reputation: 79
I am trying to debug simple hello world using visual studio code. How can set terminal path in my debugger settings file? I am using following settings.
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDB)",
"type": "cppdbg",
"request": "launch",
"launchOptionType": "Local",
"miDebuggerPath": "/usr/bin/gdb",
"targetArchitecture": "x64",
"program": "${workspaceRoot}/hello.out",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceRoot}",
"environment": [],
"externalConsole": true
},
{
"name": "C++ Attach (GDB)",
"type": "cppdbg",
"request": "launch",
"launchOptionType": "Local",
"miDebuggerPath": "/usr/bin/gdb",
"targetArchitecture": "x64",
"program": "${workspaceRoot}/hello.out",
"args": [],
"stopAtEntry": true,
"cwd": "${workspaceRoot}",
"environment": [],
"processId": "enter program's process ID",
"externalConsole": true
}
]
}
Upvotes: 3
Views: 3318
Reputation: 1
If you are reading this, please note bash, zsh, fish, starship etc are cli tools not terminal emulators. Go to VS Code > Settings > Terminal External and change it to a terminal emulators like XTerm, Konsole, Gnome-Terminal. bash, zsh etc. won't work as they just read/write to stdin/stdout and emulate commands. Terminal Emulators complete the interface by providing stdin/stdout and probably stderr to the cli-tools. Peace.
Upvotes: 0
Reputation: 1
Create this /usr/bin/xterm script:
#!/bin/bash
/usr/bin/konsole -e 'bash -c "$6"'
Works fine in VSCode. A symlink won't work because of the quoting.
Upvotes: 0
Reputation: 21
The fix is easy, open up a terminal and type the following commands:
cd /usr/bin
sudo ln -s ./{your_terminal} xterm
Upvotes: 2