Re: Coding practice for better user-proofing

new topic     » goto parent     » topic index » view thread      » older message » newer message

Thanks,
I do it a bit differently. I only use the console if my logfile open, or last put returned -1;
The downside of that is that there is a console window always open behind my GUI. So I make WinMain big enough that its not seen ;)

What I wanted to do, was have a user debug function where that function tests the public variable of debug_level and outputs more or less debug detail to the logfile, depending on that debug_level value.
While I am there, I call date() and save the results as public too for other reasons. All I need to do, is to place my debug function call inside my other procs/functions, after private variables are set and before any branch/test code within that proc/function.
Maybe store all private and passed vars for the function/proc to be debugged, as a single sequence thats the argument to the debug call, not forgetting the name of the proc/function we are calling from. And finally in the user debug function will be a option of trace(1) - when I am desperate!

Regards,
Alan

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu