Problem: When I am running a unit test in IntelliJ Idea (by clicking on the green triangle), and the test passes, all the println! output is hidden. This is annoying as I often like to abuse the testing infrastructure to run small snippets of code and inspect the output.
It appears the reason is related to https://stackoverflow.com/questions/25106554/why-doesnt-println-work-in-rust-unit-tests and the solution is to add --no-capture.
Question: how do I tlel IntelliJ/IDEA’s Rust plugin to add --no-capture everywhere?
Here's a way to do it:
Edit the command field to include the following arguments after
Apply and then run to your heart's content.
The unfortunate downside is that this is no longer recognized as a testing suite for IntelliJ, so you will need to create a new separate command to run this without the
-- --nocapture piece.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.