Mapping IDE -> gdbserver(source) remotedebug(attach) #9389
Unanswered
connypruppas
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have a trouble that while developing on windows the project is compiled from the same mounted drive using linux-server.
The app is then started from the same server.
So when the sources are loaded the path is "/drive/project/main.cpp". (info sources)
the drive is mounted under F:\ in windows and when vscode tries to add a breakpoint it says "break-insert -f C:\drive\project\main.cpp no source file named C:\drive\project\main.cpp
If i add it manually through the debug console removing "C:" it works.
my launch:
{
"version": "0.2.0",
"configurations": [
{
"name": "C++ Remote Debug",
"type": "cppdbg",
"request": "attach",
"logging": { "trace": false, "traceResponse": false, "engineLogging": true },
"useExtendedRemote": true,
"cwd": "${workspaceRoot}",
"miDebuggerServerAddress": "xxx.xxx.xxx.xxx:xxxx",
"processId": "6407",
"program": "${workspaceRoot}\main",
"externalConsole": false,
"miDebuggerArgs": "--cd=${workspaceRoot}",
"setupCommands": [
{
"text": "set substitute-path C:/ /./",
}
],
"miDebuggerPath": "C:/mingw64/bin/gdb-multiarch.exe",
"sourceFileMap": { "C:/drive/": "F:\" },
"MIMode": "gdb",
"linux": {
"MIMode": "gdb"
},
"osx": {
"MIMode": "lldb"
},
"windows": {
"MIMode": "gdb"
}
}]
}
As I understand soucefilemap is for the reverse purpose(gdbserver -> ide mapping), so i kinda hoped set substitute path would help but that didnt change anything. Is there a way to either remove the driveletter prefix or substitute/map it?
Beta Was this translation helpful? Give feedback.
All reactions