Can't map two sources to same destination #931
Replies: 5 comments 1 reply
-
The source mappings must be 1:1 in both directions. The debugger first transforms file paths, then then resolves breakpoints. It isn't going to try all alternate mappings until the breakpoint gets resolved. |
Beta Was this translation helpful? Give feedback.
-
To provide some context my project targets several platforms, and uses Cargo workspaces to better divide them and scale. They all share the same codebase (give or take some features), hence the symlinks (cf. https://github.com/veracruz-project/veracruz/tree/main/workspaces/linux-host and https://github.com/veracruz-project/veracruz/tree/main/workspaces/linux-runtime).
Is there any technical challenge in iterating over all mappings? |
Beta Was this translation helpful? Give feedback.
-
This would be a question for LLDB devs. CodeLLDB is about integration of LLDB and VSCode, I do not develop the core debugging engine.
Rustc does resolve symlinks into real paths. Maybe |
Beta Was this translation helpful? Give feedback.
-
Hmm, I guess it only does that when the entire workspoace directory is symlinked. |
Beta Was this translation helpful? Give feedback.
-
Found a satisfying workaround: passing |
Beta Was this translation helpful? Give feedback.
-
OS: Ubuntu 20.04
VSCode version: 1.78.0
CodeLLDB version: 1.9.1
Compiler: rustc 1.65.0
VSCode is running in a dev container
I'm trying to set breakpoints on two binaries whose sources are symlinked to the same codebase via different symlinks:
veracruz-server
:*/linux-host/crates/*
which symlinks../../
runtime enclave
:veracruz-server
and followed by LLDB (settings set target.process.follow-fork-mode child
)*/linux-runtime/crates/**
which symlinks../../
I've followed the troubleshooting guide and configured
sourceMap
as follows:Interestingly only the breakpoints associated with
*/linux-host/*
get resolved. Output frombreakpoint list --verbose
:Swapping the mappings (moving the first one below the second) makes the
*/linux-runtime/*
mapping work and the*/linux-host/*
mapping fail. Output frombreakpoint list --verbose
:Looks like mappings to an already mapped destination are ignored, or am I missing something?
Beta Was this translation helpful? Give feedback.
All reactions