codelldb: VSCode does not hit breakpoints when source path contains symlinks.
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
{ type: 'lldb',
request: 'launch',
name: 'Debug',
program: '${workspaceRoot}/target/debug/read_phonebook',
args: [ './data/contacts.csv' ],
cwd: '${workspaceRoot}' }
(lldb) command script import '/home/winni/.vscode/extensions/vadimcn.vscode-lldb-1.1.2/adapter'
bind: Invalid command `enable-meta-key'.
(lldb) script adapter.run_tcp_session(0, 'eyJzb3VyY2VMYW5ndWFnZXMiOlsicnVzdCJdfQ==')
Listening on port 37187
Output F1/LLDB: run diagnostics
lldb version 7.0.0
--- Checking Python ---
(lldb) script import sys, io, lldb
bind: Invalid command `enable-meta-key'.
(lldb) script print(lldb.SBDebugger.Create().IsValid())
True
(lldb) script print("OK")
OK
--- Done ---
Output, when I use LLDB via command line
lldb version 7.0.0
(lldb) script import sys, io, lldb
(lldb) script print(lldb.SBDebugger.Create().IsValid())
True
(lldb) script print("OK")
OK
Workspace Settings:
"lldb.logLevel": 0
What did you expect to have happened instead: The program stops at breakpoints
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 2
- Comments: 19 (9 by maintainers)
Also ran into this problem since my folder for all my projects is symlinked to my second drive. If anyone has a similar setup and therefore doesn’t want to put the
"sourceMap"into each individual launch config, creating a entry"lldb.launch.sourceMap"in your user configuration file for the symlinked projects folder also seems to work. Example for my case:@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
"sourceMap": {"<original path>: "<symlinked path>"}into my launch config, breakpoints do work.