microsoft / microsoft/vscode-cpptools
[Windows] cppdbg debugger Unable to Use Integrated Terminal with mingw
@WardenGnaw is already working on this.
Since May 14, 2020.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
I want to use the ingerated terminal inside VSC. I can only get inputs if I enable "externalConsole", which doesn't solve this issue as it requires using an external terminal.
- OS and Version: Windows 10 64-bit, build 10.0.18363
- VS Code Version: 1.45.1
- C/C++ Extension Version: 0.28.0
To Reproduce
Sample launch.json:
"configurations": [
{
"name": "g++ Build & Debug Folder",
"type": "cppdbg",
"request": "launch",
"program": "${fileDirname}\\test.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${fileDirname}",
"environment": [],
"externalConsole": true, // Only to way get inputs currently =(
"MIMode": "gdb",
"miDebuggerPath": "C:\\MinGW\\bin\\gdb.exe",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
]
Sample C++ Program:
#include <iostream>
int main() {
int input {1};
std::cin >> input;
std::cout << input << '\n';
return 0;
}
Steps to reproduce the behavior:
- Write a simple C++ program that requires user input.
- Start the debugger without enabling "externalConsole".
- Step until you reach a line that requires user input.
Additional context
The following is ran inside the integrated terminal:
'c:\Users\Vrej\.vscode\extensions\ms-vscode.cpptools-0.28.0\debugAdapters\bin\WindowsDebugLauncher.exe' '--stdin=Microsoft-MIEngine-In-rzbbs23a.feg' '--stdout=Microsoft-MIEngine-Out-0mxge4rh.udl' '--stderr=Microsoft-MIEngine-Error-gcbm3hqx.mik' '--pid=Microsoft-MIEngine-Pid-imrtgchk.lay' '--dbgExe=C:\MinGW\bin\gdb.exe' '--interpreter=mi'
Then the cursor begins blinking in the new line, but I am unable to give any inputs.
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.