microsoft / microsoft/vscode-cpptools

[Windows] cppdbg debugger Unable to Use Integrated Terminal with mingw

Open
#5,497 14 comments 1 reaction 1 assignee View on GitHub

@WardenGnaw is already working on this.

Since May 14, 2020.

bug debugger
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:

  1. Write a simple C++ program that requires user input.
  2. Start the debugger without enabling "externalConsole".
  3. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.