Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to debug Rust in Intellij idea?

I have searched for rust debugging and found guides for vs code only. My question is how to configure intellij rust for debugging?

like image 623
digiwizkid Avatar asked Aug 18 '19 05:08

digiwizkid


People also ask

Can you debug Rust?

Debugging for Rust is available in CLion, IntelliJ IDEA Ultimate, PyCharm Professional, and GoLand.

Is IntelliJ idea good for Rust?

IntelliJ IDEA, while originally built for Java by JetBrains, can also be used to code Rust. Like CLion, this is possible through the IntelliJ Rust plugin.

Does IntelliJ Rust use rust analyzer?

Does the plugin use RLS, Racer, or Rust Analyzer?  The plugin's language analysis is implemented from scratch, leveraging the IntelliJ Platform infrastructure for incremental analysis and indexing. However, IntelliJ Rust shares some code for procedural macros expansion with rust-analyzer.

How do I debug Rust or code?

Open main.rs and click the left gutter in the editor to set a break point on the println! line. It should display as a red dot. To start debugging, use either the Rust Analyzer: Debug command or select the Debug CodeLens about main() .


1 Answers

Old question, but great news! https://blog.jetbrains.com/clion/2020/05/whats-new-in-intellij-rust/ Now it's VERY easy to debug Rust in IntelliJ, just download mentioned plugin and the rest is done before first usage.

like image 81
jenda Avatar answered Sep 23 '22 07:09

jenda