rust-lang / rust-lang/rust-analyzer
Vscode extension: Looking for runnables... There's no debug target!
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Hello.
I've been encountering this specific problem with "Rust-Analyzer: Debug" no matter what platform I am on. I've been able to replicate this on Windows, and Mac OS. Now I'm on Arch Linux and after updating rust from the official repositories I'm encountering this again.
Put simply, running the command "Rust-Analyzer: Debug" leaves me in this state:
while clicking the Debug editor action above fn main() works like intended.
[pun@owo ~]$ rust-analyzer --version
rust-analyzer 1 (39ad79bec 2024-02-04)
[pun@owo ~]$ rustc --version
rustc 1.76.0 (07dca489a 2024-02-04) (Arch Linux rust 1:1.76.0-1)
I also, cannot generate launch configuration using the rust-analyzer vscode extension, receiving the same error.
If I generate launch configuration with the codelldb vscode extension then it works like expected when I press F5.
Edit: There are the custom vscode settings I currently have for rust. I have the same problem if I try to use the bundled rust-analyzer that comes with the vscode extension.
"rust-analyzer.debug.engine": "vadimcn.vscode-lldb",
"rust-analyzer.server.path": "rust-analyzer"
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
Start with the VS Code "Rust-Analyzer: Debug" command and compare it with the working Debug editor action above fn main(). Check the rust-analyzer.debug.engine and rust-analyzer.server.path settings, then reproduce the missing-target and launch-configuration errors. Done means the command finds a debug target and can generate a working launch configuration, as codelldb does with F5.
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
- Mostly clear
- Newbie friendliness
- 35/100