microsoft / microsoft/MIEngine

The debugger engine does not work with modern versions of GDB.

Open
#1,392 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

It's been the case since about version 9.? of GDB that the MI debugger engine does not work with GDB. I believe that this is because the debugger engine is expecting the wrong output from GDB, but there are numerous posts about this on sites like StackOverflow, and the only solution people have found is to downgrade their version of GDB.

The error from this is:

ERROR: Unable to start debugging. Unexpected GDB output from command "-exec-run". During startup program exited with code 0xc0000135.

I mentioned this previously here: https://github.com/microsoft/vscode-cpptools/issues/7706#issuecomment-1111801531

I'm attaching the debugger output with engineLogging and traceResponse enabled, but ultimately I'd suggest simply trying to use the debugging engine with GDB with externalConsole set to false and seeing for yourself. The debugger runs normally until the debugging engine gives up on it because of a perceived invalid output.

Versions I'm using:

C/C++ v1.15.1 Pre-Release
C/C++ Extension Pack v1.3.0
Visual Studio Code 1.76.2
GNU gdb (GDB) 13.1

debugger_output.txt

Contributor guide

No contributing guide indexed for this repository

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 by reproducing the failure with GDB 13.1, Visual Studio Code, and externalConsole set to false. Inspect the attached debugger_output.txt and the MI response around -exec-run to identify why the engine rejects the output. Done means debugging starts successfully with modern GDB versions without requiring a downgrade.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.