Let us say I have a module called example.erl

In this module I use the following construct for debugging:

%%% Switch debugging output on/off:
%-define(DBG(Str, Args), ok).
-define(DBG(Str, Args), io:format(Str, Args)).

It helps me to output various debugging info into the Erlang shell:

?DBG("Function fun1 starting... ~n", [])

But if I call example.erl from example_tests with example:test(), this output info does not appear.

How can I make it visible during a EUnit test?

UPD: I have found some related info, but I still do not know how to solve the issue.

Edit
Report