Replies: 1 comment 3 replies
-
If you go with the "codelldb.sh" approach, make sure to explicitly forward all necessary environment variables, as the debuggee is not executed as a child of codelldb.sh. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
OS: Linux Mint 22 (Linux x64 6.8.0-52-generic)
VSCode version: Version: 1.96.4
CodeLLDB version: 1.11.3
Compiler: rustc 1.84.1, but clippy is compiled against the nightly
Debuggee:
cargo test
Target:
x86_64-unknown-linux-gnu
I am trying to attach vscode dubugger to the a rust tool Clippy's test by running this command, and get an error that the
compile_test
binary is unable to loadlibrustc_driver.so
(see exact error below).TESTNAME=uninlined_format cargo test --test compile-test
Note that this unit test consists of thousands of individual compilation tests, thus is likely starting another sub-process to perform compilation of each.
Steps to Reproduce
git clone https://github.com/rust-lang/rust-clippy --recurse-submodules -j8
cd rust-clippy
TESTNAME=uninlined_format cargo test --test compile-test
.cargo/config.toml
and add a new section:.cargo/codelldb.sh
with this content andchmod +x
it. I assume this is the only way to pass the env varTESTNAME
to the vscode. Without this, Clippy runs thousands of tests.launch.json
:Part that works OK (without debugger)
TESTNAME=uninlined_format cargo test --test compile-test
runner
configuration, the vscode is launched with the correct configuration. VSCode still gets called, and shows something like this in the new terminal window. Note that even if there are any debugging breakpoints in theclippy_lints/src/format_args.rs
, debugger never stops. Thedebug console
shows no errors.output
terminal output
debug output
See also the attached verbose_log1.txt
Part that fails (with debugger)
verbose log
/home/nyurik/.rustup/toolchains/nightly-2025-01-28-x86_64-unknown-linux-gnu/lib
/home/nyurik/.rustup/toolchains/nightly-2025-01-28-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib
LD_LIBRARY_PATH
inside the .config/codelldb.sh` but that had no effect:Beta Was this translation helpful? Give feedback.
All reactions