Debugging my main code is fine, everything works. But some of my unit tests are complicated and I want to step through those with debug and see what is happening. There's a video from Mickael Istria that shows this working just fine. He runs the test using Run As>Cargo Based Rust Test which runs it without debug then he opens the test results and picks Rerun (Debug) which runs the test in debug,it stops at a break point etc.
For me the behaviour is almost the same. The Rerun (Debug) does run, but it doesn't stop at the break. It appears to be a normal run.
I did find a workaround. I created a new debug lunch config under the Rust group, gave it my project name, build command build (not sure how much that matters) and the executable is the one generated by the test run which gets logged in the console. See the screenshot
When I run this I do get the behaviour I want, ie stops at breakpoints in the test and lets me examine variables etc. But obviously it would be simpler to run it like it shows in the video.
Environment:
- Eclipse IDE for Rust Developers 1.2.5.202409112007
- Corrosion: Rust edition in Eclipse IDE 1.3.0.202409112007
- Xubuntu 24.04.4 LTS x86_64
Apart from installing the Eclipse IDE for Rust Developers the only config I've done is to install rust-analyzer using the button on Window>Preferences>Rust
Debugging my main code is fine, everything works. But some of my unit tests are complicated and I want to step through those with debug and see what is happening. There's a video from Mickael Istria that shows this working just fine. He runs the test using
Run As>Cargo Based Rust Testwhich runs it without debug then he opens the test results and picksRerun (Debug)which runs the test in debug,it stops at a break point etc.For me the behaviour is almost the same. The
Rerun (Debug)does run, but it doesn't stop at the break. It appears to be a normal run.I did find a workaround. I created a new debug lunch config under the Rust group, gave it my project name, build command
build(not sure how much that matters) and the executable is the one generated by the test run which gets logged in the console. See the screenshotWhen I run this I do get the behaviour I want, ie stops at breakpoints in the test and lets me examine variables etc. But obviously it would be simpler to run it like it shows in the video.
Environment:
Apart from installing the
Eclipse IDE for Rust Developersthe only config I've done is to installrust-analyzerusing the button on Window>Preferences>Rust