microsoft / microsoft/vscode-cpptools
Unable to launch external console on MacOS when using GDB
Open
@WardenGnaw is already working on this.
Since May 15, 2019.
debugger
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version: MacOS Mojave
- VS Code Version: 1.33.1
- C/C++ Extension Version:0.23.1
- Other extensions you installed (and if the issue persists after disabling them):
- A clear and concise description of what the bug is.
When trying to debug on macOS using gdb instead of lldb external console is not started, even when "externalConsole": true is set in launch.json.
To Reproduce
Please include a code sample and launch.json configuration.
Steps to reproduce the behavior:
- Create simple hello world program like one below:
#include <iostream>
#include <string>
using namespace std;
int main()
{
string name;
cin >> name;
cout << "Hello " + name << endl;
return 0;
}
- Create launch.json like the one here:
{
"name": "(gdb) Launch Mac",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}/${fileBasenameNoExtension}.out",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true,
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
]
}
- Launch debugger.
- No external input console is started, disabling user to enter
namewhen debugging.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.