microsoft / microsoft/vscode-cpptools

"Debug adapter process has terminated unexpectedly" when debugging on window used mingw gdb

Open
#1,381 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

debugger
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

OS: WIN7 64BIT
VSCODE: 1.19.1
MINGW: 0.6.2 GDB: 7.6.1

i can compile and debug use g++ and gdb on windows console.

but when i using vscode and c++ plugin for debug, it was always said "Debug adapter process has terminated unexpectedly" !
i still try with restart vscode and windows, but nothing change

it's my launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Launch (GDB)",
"type": "cppdbg",
"request": "launch",
"targetArchitecture": "x86", // i had try x86, x64, x86_64, still the same error
"program": "d:\workspace\test\test.exe",
"windows": {
"MIMode": "gdb",
"miDebuggerPath": "gdb.exe" // gdb path is in my windows environment variable
},
"args": [],
"environment": [],
"stopAtEntry": false,
"cwd": "d:\workspace\test\",
"externalConsole": false,
"preLaunchTask": "g++",
"logging": { "engineLogging": true }
}
]
}

also nothing log output.
any suggest?
thank you for help.

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.

Research direction

Start with the supplied launch.json on Windows 7, checking the windows MIMode, miDebuggerPath, targetArchitecture, and preLaunchTask settings. Reproduce the failure while examining the configured engine logging and gdb.exe resolution; done means the C++ debug session launches successfully in VS Code rather than terminating unexpectedly.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.