VSCode: How to "Run without debugging"?

Hello, new Rust user here. I installed VSCode and at first glance, Rust integration is easily set up and works smoothly, but for one thing: running cargo run. I tried both matklad.rust-analyzer and rust-lang.rust. rust-analyzer shows me a run button above the main function, which I can click and works fine. rust-lang.rust doesn't show a run button.

Running cargo run by Run -> Run Without Debugging menu or by Ctrl+F5 on the other hand is not possible. Pressing either shows me a popup to select an environment, of which there are only unrelated Chrome, Edge and Nodejs options. Choosing "More..." shows me the plugin sidebar, with rust-analyzer and rust-lang.rust again. (Same with Run -> Start Debugging.)

Sure, I can run cargo run manually in the terminal, though it feels like I'm missing something here. Can you help me get started?

Run -> Run Without Debugging is for using a debug configuration without attaching a debugger. You should use Tasks: Run Task > cargo > rust: cargo run instead.

Thanks, after a bit of fiddling it now works. I also got Ctrl+F5 working by installing lldb.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.