rust-lang / rust-lang/rust-analyzer

Unable to run from Run | Debug buttons

Open
#18,042 6 comments 2 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

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

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.