Skip to content

Debugging a test is not working #459

Description

@rjpnz-create

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

Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions