rust-lang / rust-lang/rust-analyzer
Unable to run from Run | Debug buttons
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
rust-analyzer version: 0.402095-linux-x64/server/rust-analyzer
rustc version: 1.80.1
editor or extension: VS Code
relevant settings: (eg. client settings, or environment variables like CARGO, RUSTC, RUSTUP_HOME or CARGO_HOME)
I've been working with Rust-Analyzer for a while but I took a break from my Rust project for about a month. I came back and ran updates, but now it won't run code or tests.
I can run code from the integrated terminal and VSCode directly (F5, cargo run/test), but when trying to run any code from the Run | Debug buttons above Tests or Main, it fails.
On running it gives me the error: "Terminal process failed to launch: Path to shell executable "cargo" does not exist."
Trying to run debug gives me an additional Error:
"Cargo invocation has failed: Error: could not launch cargo: Error: spawn cargo ENOENT."
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from the Run | Debug buttons above Tests or Main, then compare it with F5 and integrated-terminal cargo run/test, which work according to the report. Trace the launch path that invokes cargo and verify that these buttons can find and start cargo rather than treating it as a shell executable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100