Switching debuggers and renderers
RustRover provides its own implementation of two debuggers: LLDB and GDB. You may or may not be able to choose between them depending on your OS.
warning
On WSL, you cannot use the RustRover debuggers. Make sure you have GDB installed.
On Windows, the toolchain configured for your project determines the debugger you can use:
MSVC toolchain. If you are using Rust's MSVC toolchain, you can only debug code with LLDB.
GNU toolchain. With a GNU toolchain, you must use GDB.
note
You can double-check toolchain settings in Settings | Rust.
RustRover will notify you if the active debugger does not match the project's toolchain:
![Notification about a debugger-toolchain mismatch Notification about a debugger-toolchain mismatch](https://resources.jetbrains.com/help/img/idea/2024.3/ri_debugger_toolchain_mismatch.png)
On Linux, you are free to choose between LLDB and GDB. Both debuggers are bundled, LLDB is enabled by default.
On macOS, you can only use LLDB. It is bundled and enabled by default.
Go to Settings | Build, Execution, Deployment | Debugger.
Locate the Rust section and select the preferred debugger from the drop-down list.
warning
If you choose GDB, make sure MinGW is installed.
In order to debug on WSL, you must have a GDB debugger installed. to double-check, run:
which -a gdb
To install GDB, refer to the official GNU Project website.
You can switch the renderers RustRover uses to display Rust types in the Variables pane.
Go to Settings | Build, Execution, Deployment | Debugger | Data Views | Rust.
For the debugger in use, select an option from the drop-down list:
No renderers. This option disables explicit rendering, leaving only the type support provided by GDB or LLDB natively. Because Rust type formatters are currently not available in LLDB and GDB out of the box, this option means no rendering for types other than C/C++ types.
Rust compiler’s renderers. With this option, RustRover takes pretty-printers from the standard rustc distribution and loads them onto the debugger.
note
There should not be significant difference between the Rust compiler's renderers and the bundled renderers (described below). However, we recommend using the bundled ones as they are being tested and verified by the RustRover team.
Bundled renderers. The IDE’s own renderers are implemented from scratch for both GDB and LLDB, unifying type representation for the two debuggers. These formatters build tree views for strings, structs, enums, and vectors, making it easier for you to look inside child elements.
The bundled renderers also support standard library types like
HashMap
,HashSet
,Rc
,Arc
,Cell
,Ref
, and others.
Thanks for your feedback!