Implement debugger
See original GitHub issueThe work has started: https://github.com/intellij-rust/intellij-rust/tree/fc2cfb8e0fc76984495a34ae6a83cbb37188c699/debugger
State of the art
The debugger is officially available in CLion since 2018.1. Note, CLion doesn’t support debugging with msvc toolchains, so if you are using Windows, you need:
- install gnu rust toolchain (
rustup install stable-gnu
) - setup gnu (Cygwin or MinGW) toolchains in CLion (
Preferences > Build, Execution, Deployment > Toolchains
).
To debug you just need to:
- Run debug command via gutter icon
- Or create
Cargo Command
run configurtion and run debugging via debug action
Old content
Old content
If you use CLion and the nightly Cargo, you should be able to Debug Cargo configuration:
https://zippy.gfycat.com/AcidicMediocreCoati.webm
A major missing piece is that we don’t pass command line arguments to the debuggee yet (this requires some work on the Cargo side of things first).
Old content 2
Currently for technical reasons (commit message) debugger is implemented as a separate plugin.
The current build can be download from TeamCity: Download. It may work with CLion 2016.3.2 and intellij-rust 0.1.0.1611.
Note that this is super unstable, debugger can invoke any kind of undefined behavior, including, but not limited to, summoning of nasal daemons. Most importantly, rust debugger may (though in theory it should not) break C++ debugging.
Nonetheless, step into and local variables view more or less work 😃
As you can see on the screenshot, at the moment you unfortunately have to create a separate Cargo debug
run configuration type (as opposed to the usual Run cargo command
). Also, you only can debug binaries now 😦
Issue Analytics
- State:
- Created 7 years ago
- Reactions:254
- Comments:137 (37 by maintainers)
Top GitHub Comments
Getting a good debugger for Rust would be a great help, especially as the current options are rather limited.
@windoze the plugin totally works with CLion, you don’t need to migrate anything.
I’m planing to start the work on the debugger soon 😃