-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect file path locating by break point #442
Comments
There's only a blurry screenshot... So: what is the scenario, what the launch config, how was the breakpoint created, what path is wrong and how should it be like? |
updated original post |
I see , the scenario is an ssh launch config from a Windows environment with the workspaceFolder being {
"version": "0.2.0",
"configurations": [
{
"type": "gdb",
"request": "launch",
"name": "Launch (SSH)",
"target": "func",
"cwd": "${workspaceFolder}",
"ssh": {
"host": "192.168.1.1",
"cwd": "/home/debug/",
"password": "root",
"user": "root",
"sourceFileMap": {
"\\cygdrive\\f\\project\\build\\Cygwin_RelWithDebInfo": "${workspaceFolder}"
}
}
}
]
} |
I'm using cross-compiler from windows to build linux binary. if I changed the launch.json according to your instruction, gdb will complain below and hit no break point |
Where dos that cygdrive comes from? |
I have no idea. |
ah, an edit... it definitely isn't because of vscode or cmake as the source paths for the debugger are inserted by the compiler - a cross-compiler that's cygwin based does make much more sense. As an alternative you can try to use the old config with a GDB option, possibly in autorun: |
debug console output:
gdb seems working fine with the source file path(without cygdrive/...) |
Using ssh gdb(13.1), triggering break point ok but with a wrong path
launch.json:
I add a break point at IDE side(by click at line number)
The popup file's path:
\cygdrive\f\project\build\Cygwin_RelWithDebInfo\src\func\F:\project\src\func\main.cpp
It should be:
F:\project\src\func\main.cpp
The text was updated successfully, but these errors were encountered: