Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

An error happened when launch gdb at msys2/bash.exe

Open
#1,499 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
30/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
bash, cpp, vscode

Research direction

Start with the provided launch.json and settings.json, then inspect how WindowsDebugLauncher.exe is invoked when stdin and stdout are enabled for the MSYS2 bash profile. Reproduce the crash using the stated C++ launch configuration on Windows 10 or 11, and confirm that debugger input works without the bash terminal crashing.

Written by the indexing model from the issue text.

Description

Same software and config,but one is win10 (vscode version may newer) , the other is win11.

launch.json

{
	"version": "0.2.0",
	"configurations": [
		{
			"name": "C++ Launch",
			"type": "cppdbg",
			"request": "launch",
			"program": "${workspaceFolder}/build/Start.exe",
			"args": [
				"-arg1",
				"-arg2"
			],
			"setupCommands": [
				{
					"description": "Enable pretty-printing for gdb",
					"text": "-enable-pretty-printing",
					"ignoreFailures": true
				}
			],
			"stopAtEntry": false,
			"cwd": "${fileDirname}",
			"environment": [],
			"externalConsole": false,
			"MIMode": "gdb",
            "miDebuggerPath": "D:/Users/17269/Documents/Test/Msys2/mingw64/bin/gdb.exe",
			"preLaunchTask": "CMake Build"
		},
	]
}

setting.json

    "terminal.integrated.profiles.windows": {
        "msys64": {
            "path": "D:\\Users\\17269\\Documents\\Test\\Msys2\\usr\\bin\\bash.exe"
        }
    },
    "terminal.integrated.defaultProfile.windows": "msys64"

I could run the launch normally without stdin or stdout.

but when I need them , the bash show

 /usr/bin/env c:\\Users\\17269\\.vscode\\extensions\\ms-vscode.cpptools-1.23.6-win32-x64\\debugAdapters\\bin\\WindowsDebugLauncher.exe --stdin=Microsoft-MIEngine-In-0crzsm0c.qxj --stdout=Microsoft-MIEngine-Out-bm3m2i3p.0mr --stderr=Microsoft-MIEngine-Error-becw4p1q.nmz --pid=Microsoft-MIEngine-Pid-eo4rokdf.wz3 --dbgExe=D:/Users/17269/Documents/Test/Msys2/mingw64/bin/gdb.exe --interpreter=mi
icrosoft-MIEngine-Error-becw4p1q.nmz --pid=Microsoft-MIEngine-Pid-eo4rokdf.wz3 --dbgExe=D:/Users/17269/Documents/Test/Msys2/mingw64/bin/gdb.exe --interpreter=mi ;a58d0036-cb99-44a9-bbfa-91ddf6772ff8

And actually I can't input any thing because it has gone crash

Dominant language
C#
Stars
859
Forks
233
Avg merge
4d 14h
Merged PRs (30d)
3

Getting set up

We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.

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.

More from microsoft/MIEngine

All issues in microsoft/MIEngine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.