Search code examples
rustjetbrains-iderustrover

What's the correct way to debug a test in Rust Rover?


I have a test in my Rust code that I want to debug. While RustRover picks up the test and the hover/context menu allows me to run it, when I click the debug option I get an error

error: the option `Z` is only accepted on the nightly compiler

It looks like RustRover automatically appends --format=json --exact -Z unstable-options --show-output to the test. I would think this is an issue with the compiler but it looks like VSCode doesn't have this problem and I'm able to debug my tests with no problem. Is there something I'm missing like an option or otherwise in RustRover?


Solution

  • Turns out it's a known bug in RustRover. See Youtrack Issue. Updating to the newest version (2024.2 EAP) fixed it