I want hide all outputs created by Print command from user's function defined in module .m
More precisely the problem is following: I have a module that solves some specific task (It's not necessary to know the task for understanding the question). I use Print command inside the module to output process of evaluation. It's useful for debugging but not for using (all inner output must be hidden when user calls a function declared in the module). So, in every stable version of the module I have to put comments (* *) and delete them for gebugging. I suppose that this way is uncivilized, and Mathematica should have a regular way to hide inner outputs.
For example, we have 3 files in the same directory. Can you suggest me a simple way how to hide all outputs by default and print all outputs in debugging mode?
modul.m:
f[x_]:=Module[{y}, y=Cos[x]*Sin[x];
Print["modul.m: y=",y];
Return[y]];
debugging.nb:
SetDirectory[NotebookDirectory[]];
<< modul.m;
x=10;
f[x] (* print all inner output generated while f is evaluating*)
x=20;
f[x](* print all inner output generated while f is evaluating*)
application.nb:
<< modul.m
y=f[10]+f[20];
(* Hide all outputs of f during evaluation. Command ; doesn't work for this issue. *)
