microsoft / MIEngine

The Visual Studio MI Debug Engine ("MIEngine") provides an open-source Visual Studio Debugger extension that works with MI-enabled debuggers such as gdb and lldb.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

In `-target-select {remoteMode} {destination}`, the GDB remoteMode should also be able to be supplied by user.

xiahualiu opened this issue · comments

if (!string.IsNullOrWhiteSpace(destination))
{
string remoteMode = useExtendedRemote ? "extended-remote" : "remote";
commands.Add(new LaunchCommand($"-target-select {remoteMode} {destination}", string.Format(CultureInfo.CurrentCulture, ResourceStrings.ConnectingMessage, destination)));
}

As you can see, the remoteMode can only be chosen from extended-remote or remote. After checking the older commits I believe the extended-remote was previously added to give support for the OpenOCD debugging server.

However, there are many other remote targets out there. For example, QNX OS uses qnx as the GDB target. You can list all available targets using help target in a GDB console.

I think making the {remoteMode} a json user-defined variable is a better idea. Since it is really up to the user what type of remote target gdb is going to attach to, and should not be limited by the fixed options provided by VS Code.

Thanks,
Xiahua