PDA

View Full Version : debug.write statements


jpan
06-14-2004, 05:36 AM
Hi,

How do I suppress debug.write statements?

I have a function

function debugWrite(str) {
if ($debug==true) {
debug.write(str);
}
}


Now, I don't really have a way of testing the validity of this function since if debug is false, the debug window doesn't show up... so I don't really know if the text is still being written or not... How can I deal with this?

Thanks!

James

jpan
06-14-2004, 07:15 AM
I think I found a solution:

I'm going to define a new attribute for global.showMsg and use this to determine whether to display text or not. So I'll use debug=true to bring up the debug window, and use showMsg=true to turn on debug-message display.

Will try that now!