Wish enable/disable Log () [per Sub]

nikolaus

Member
Licensed User
Longtime User
I am using log () heavily to identify the actual Sub.

It would be nice to have an option to disable Log () with one click for the whole project.

An checkbox option in the modules tab to enable/disable Log () per Sub would be terrific.
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
You could use a own log-sub instead of using log-command directly. In this sub you do the log and have the ability to use a global variable to en-/disable logs at runtime....
 

nikolaus

Member
Licensed User
Longtime User
Good idea, I will do that next time where it fits.

However that does not meet my needs. I am using logging to identify the actual Sub:

Sub MySub (v As Int) : Log ("MySub: "&v)
...

or to log Variables and filewrites during runtime.

This helps a lot where the debugger fails, e.g. when the program flow depends on timers and user interaction.
 

nikolaus

Member
Licensed User
Longtime User
Why not use conditional compilation?

This is in effect the same like Manfreds suggestion.

To archieve what I want (see above) I had to double all subs.
 
Top