rust-lang / rust-lang/rust-analyzer

getDebugConfiguration doesn't handle runner override

Open
#19,882 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-bug
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

On VSCode, when running a test using lens snipper, the test is run using cargo test.
The debug use "cargo test --message-format=json --no-run ..." in order to get executable information in order to construct debugger args.

If in .cargo/config.toml the runner is overridden the run is working well unlike the debug.
Indeed "cargo test --message-format=json --no-run ..." doesn't give any information about the runner.

A way to have the runner is to parse the line containing Executable on stderr when using "cargo test -v --no-run"

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at getDebugConfiguration and reproduce a VSCode test-lens debug run with a runner override in .cargo/config.toml. Compare the existing cargo test --no-run behavior with cargo test -v --no-run and its stderr Executable line. Done means debugging obtains the configured runner and works when the runner is overridden.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
devtools, testing-qa
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.