Disable script debugging from within script - IE

Y

Yansky

Hi, I was just wondering if it is possible to disable script debugging
in IE from within a script. I know I can disable it manually through
the IE tools menu, but is it possible to disable it from within a
script?

e.g. debug = false; or something?

I've googled, but all the results show the manual way through the
tools menu.

Cheers.
 
P

Patient Guy

Yansky said:
Hi, I was just wondering if it is possible to disable script debugging
in IE from within a script. I know I can disable it manually through
the IE tools menu, but is it possible to disable it from within a
script?

e.g. debug = false; or something?

I've googled, but all the results show the manual way through the
tools menu.

If your purpose is to prevent invocation of the debugger (requests to
debug) on errors/exceptions, you might set try/catch blocks or set Error
object types to have IE ignore errors outside of code for which you don't
want to catch them.

Such as setting the window.onerror property at various points in code to
catch or not catch errors.

But isn't it a good idea to try catch and fix all errors and exceptions?
 
Y

Yansky

If your purpose is to prevent invocation of the debugger (requests to
debug) on errors/exceptions, you might set try/catch blocks or set Error
object types to have IE ignore errors outside of code for which you don't
want to catch them.

Such as setting the window.onerror property at various points in code to
catch or not catch errors.

Thanks for the help. I googled window.onerror and found a good example
of how to supress the error dialogue box:

function errorsuppressor(){
return true
}
window.onerror=errorsuppressor

It seems to be working fine. :)
But isn't it a good idea to try catch and fix all errors and exceptions?

The problem is I don't think it's my code that's throwing up the
errors. The script I'm writing is a greasemonkey script that uses
jQuery and is running on IE via the Reify Turnabout toolbar. So I
think IE just chucks a spastic with that combination.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top