PDA

View Full Version : debug messages


scorpio
05-20-2004, 07:40 AM
Hi,

when the debug attribute on canvas equals false or the debug window is not visible, does the debug.write() method still write messages in the background or does it stop writting?

without debug messages the application seems to be faster, is there a way to disable the debug message writing without deleting all instances of there debug.write() method from the code?

thanks

antun
05-20-2004, 10:50 AM
The method will still be called if the debug window is not visible, because you could make it visible through script, so the messages do get put in the debugger.

If you have the debug attribute in canvas set to false, then the debug object is not created, and the debug.write() method call doesn't cost anything, but the argument to it would still be calculated.

You can do:


if ($debug) Debug.write( "foo" );


... to prevent this from happening.

-Antun