Question

The javascript command 'debugger;' will start a debugger.

 debugger;

But (with Visual Studio 2008 installed) I cannot seem to figure out how to get this to break into the IE8 debugger. It will give me a list of choices such as VS2008, VS2010, Microsoft Script debugger.

If I do the following it will break into the (lightning fast) VS2008 debugger...

 throw Error("d");

... but I want to get it to do so when I use the 'debugger;' command. How can I do this

Was it helpful?

Solution

Step 1: Open the page you want to debugger
Step 2: Open IE8 Debugger and click Script -> Start Debugging
Step 3: Then It will break into the IE8 debugging while execute the code.

Hope it helps!

OTHER TIPS

If you need to jump into the debugger before you have access to the Start Debugging command, such as in an onLoad handler, you can use any illegal instruction to pop into the IE8 debugger, such as:

null.length;
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top