microsoft / microsoft/MIEngine
MIMode doesn't use RemoteGdbTarget functionality when setup by .gdbinit
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 859
- Forks
- 233
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 3
Description
In order to make our debugging environment reusable across multiple systems and projects, we make heavy use of .gdbinit and the python support that allows. In this way, the environment can be determined without having to add custom details to a users launch configuration. We can just set the launch configuration generically, and it will works for everyone in the project without changes. It also makes the launch configuration easy to configure, as the appropriate gdb environment is automatically selected and configured, and all the custom details are internal. eg;
{
"name": "Debug App,
"type": "cppdbg",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/build/debug-linux-armv8-static/app",
"args": [],
"stopAtEntry": true,
"externalConsole": false,
"MIMode": "gdb",
"miDebuggerPath": "${workspaceFolder}/debug/gdb_wrapper.sh",
"miDebuggerArgs": "build/debug-linux-armv8-static/app",
},
This all works great, apart from the fact that when the gdb_wrapper.sh and .gdbinit connect to a remote target, and MIEngine assumes it is a local connection because no miDebuggerServerAddress was provided. This results in the Pause UI using the incorrect method to break into the application. The launch configuration is committed in the git repo, and the server address is custom to the user, so we don't want to provide it.
Would it be possible to add a field that tells the MIEngine that a remote target was used, even though it was configured by the cppdbg plugin, but rather by gdb?
In the snippet above, I know I'm debugging a remote armv8 application, and so if something like "forceRemoteConnection": true, could be specified, and the MIEngine used that in IsRemoteGdbTarget(), then the cppdbg debug UI would work in this generic case.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start by tracing the remote-target decision through IsRemoteGdbTarget() and the cppdbg launch configuration path described in the issue. Check how gdb_wrapper.sh and .gdbinit establish the remote connection, then verify that a forceRemoteConnection setting makes the Pause UI use the remote-target behavior without requiring miDebuggerServerAddress.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100