Are there any plugins for VSC that you consider to be the bare minimum when working on a Rust project on that IDE ?
Or simply plugins that you would always recommend to your team members ?
Are there any plugins for VSC that you consider to be the bare minimum when working on a Rust project on that IDE ?
Or simply plugins that you would always recommend to your team members ?
All you need is rust-analyzer.
There's also Even Better Toml for Cargo.toml.
Yep.
Regardless of language I really like Error Lens, which works with any other diagnostics extensions.
I like to add crates to the list. It checks version numbers in cargo.toml dependencies and shows you the most recent version of each crate used.
There is even a Rust extension Pack meta package in the vscode repository that has rust analyzer, Even better TOML, crates and Rust test explorer in it, however, the last one isn't needed (anymore?) as rust analyzer has a setting to enable the standard test explorer of vscode for Rust. Which is better, especially if one mixes code from several languages, each with its own set of tests.
For the time being, the only thing missing from vscode is test code coverage for Rust. The Jetbrains IDE's (Intellij IDEA with the Rust plugin, Rust Rover) have that. But they suck at mixing Rust with C/C++/Swift etc.
AFAIK: if you want to use VS Code to Debug then you most likely need a few more extensions, depending on your development/test platform.
For example, I have one Windows 11 laptop and one Ubuntu laptop with Rust on both.
On Windows 11 I have CodeLLDB (native LLDB debugger) and also Microsoft C/C++ extension. Alternatively if you use llvm clang instead of Microsoft C/C++ there is a clangd C/C++ extension on Windows but you must first remove the Microsoft C/C++ extension.
On Ubuntu you dont have the Microsoft C/C++ option so you need to pick something else, I would guess clangd llvm ? Perhaps something from gnu C?
More knowledgeable folks when it comes to VSC and Rust debug support will correct me here please.
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.