-
Notifications
You must be signed in to change notification settings - Fork 245
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
VSCode does not hit breakpoints when source path contains symlinks. #151
Comments
Hmm, sorry, no idea what's going on. |
It stops! Mainwindow:
Debug console:
F5 runs to the end without stopping |
If you run |
My debugger now works as expected. I copied the project into the home directory and everything works. The problem seems to be that I had a symlink inside the path. Other development environments have no problem with this. Many thanks for the support. |
Okay, let's keep it open for now. Symlinks should have worked. |
I checked that again. I set a symlink on the same level and it didn't work again. The symlink causes the problem |
I seem to be having this issue as well (Ubuntu 18.04.2, LLDB 6.0, VS Code 1.31.1, CodeLLDB 1.2.1). |
Hit this problem as well. (macOS 10.14.5, lldb-1001.0.1, VS Code 1.32.3, CodeLLDB 1.2.1). After "break set", the breakpoint indeed shows up in "break list" (also in VSCode GUI, as a little red dot in line number gutter), but "continue" runs until program exits. I am using lldb "gdb-remote" for remote debugging. Running lldb in command line hits breakpoint as expected. launch.json:
The path for |
I can confirm this issue as well. I've recently symlinked my main programming folder and noticed this issue. EDIT: to clarify, it works if I open the project folder from the absolute path, but fails if I open the project folder from the symlinked path. Might be a OSSCode/VSCode bug? |
@almindor, are you debugging a Rust program? The problems seems to be in the Rust compiler: it seems to normalize source file paths before encoding them in the debug info. If I add |
Ah that seems to be correct. I wonder if it can be considered a bug we should report upstream. Strictly speaking the debug info should have the "proper absolute path" |
Interestingly I hit a similar issue on win7/gnu. Had the code in c:\git\hello-world and had c:\git mapped to h:\ - if I try to debug from h: in vscode and cargo build it from c:\git\hello-world it skips all the breakpoints. |
I just hit this issue, took me quite a while to find this GH issue and final get it working! FYI I am running Ubuntu 18.04 LTS, vscode-lldb 1.5.0 and vs code 1.45.1. I have a sym link like so:
If I open my Rust program source directory in vs code via the sym link then LLDB with stop-on-entry true shows sourcel location unknown and is unable to set breakpoints via the point-n-click in the VS code window, but interesitngly setting a breakpoint via the debug console with command:
Does work, does cause the breakpoint to appear in the "BREAKPOINTS" view in vs code but NOT in the gutter in Re-opening the program source directory without the sym link makes everything just work. |
@ximon18 see this comment |
Thanks, I'll try that, apologies for not spotting that in the messages above! |
Also ran into this problem since my folder for all my projects is symlinked to my second drive.
|
I have this problem too. I checked the 'breakpoint' request json, the path is real path, and the debug info record in the ELF is the symlink path. I think this is a lldb bug. An easy way to verify is, start lldb, executing |
This is caused by the Rust compiler replacing symlinks with real paths in debug info. In order to use symlinks, you'll need set up a sourceMap. |
Which OS: Linux Kubuntu 18.10
Which extension version: 1.1.2
Which LLDB version: 7.0
Which VSCode version: 1.29.1
What is the problem and how did you get there:
The program does not stop at breakpoints. It runs to the end without stopping. If I use the lldb debugger directly, it works as expected.
Output lldb
Output F1/LLDB: run diagnostics
Output, when I use LLDB via command line
Workspace Settings:
What did you expect to have happened instead:
The program stops at breakpoints
The text was updated successfully, but these errors were encountered: