Closed vitalyPru closed 11 months ago
Hi and welcome to Exercism! :wave:
Thanks for opening an issue :slightly_smiling_face:
This is already possible. I do not remember how to expose this though.
But do you not have this ability when you run your tests locally?
I just use only cloud version. And if I put println!() in my solution, there are no any output in test results
Yes, println()
would not be expected to show in the reports for testing.
If getting serious about the language, I do encourage local development though. It gives control back to you, rather than relying on what we provide on the server.
I have sent out a "do you remember how" question in our chat. Hopefully an answer comes soon for you regarding debugging output in the tests.
I found,, that debug output works for structs, which derived Debug trait. So. issue is closed.
Does this need adding to the docs for this? @ErikSchierboom - there's a md doc for this specifically, right?
@iHiD correct, this section is missing for rust because the content is missing
:+1: Reopened and transfering to Rust repo.
Either of the dbg!
or eprintln!
macros will emit to standard error, which may be captured as debug output; I'd need to double-check the test runner to see what precisely gets captured. If it is in fact captured, then the blurb should mention (and link to documentation for) each of those.
Here are the docs for the file that should contain the debug instructions (provided it does indeed work): https://exercism.org/docs/building/tracks/shared-files#h-file-debug-md
It appears that the test runner sends the debug output to a file called results.out
, which I believe to have been meaningful in an older version of the test runner interface.
Until that is updated into the current interface, I suspect that the output simply isn't being captured.
Until recently, both stdout
and stderr
were captured by the test runner, but they were displayed together as one big string with the error from the failed assertion of the test.
I recently updated the test runner to separate these two, for slightly improved UX. Here's my manual test:
I will update the documentation accordingly.
Please, consider the possibility to allow debug print during Rst tests.