Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is anyone able to run rust tests in VSCode when using a workspace?

I'm using VSCode with a workspace specified in my Cargo.toml. I have embedded #[test] which show up in the editor window as a clickable run test. However, when I click VSCode attempts to run tests, but seems to not run any, having filtered it out. Has anyone managed to get embedded tests to work? With simpler projects, which don't have a workspace, I am able to get tests to run.

like image 644
Bruce Avatar asked Dec 06 '25 03:12

Bruce


1 Answers

As it turned out, I just needed to convert my top-level Cargo.toml into a Virtual Manifest. Once I did that, tests now run from the VSCode edit window.

like image 151
Bruce Avatar answered Dec 08 '25 20:12

Bruce



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!