Reputation: 3241
I've added a debugger statement to some JavaScript that's executed on page load on page B. I've opened page A, opened the F12 debugger tools. I have "Break on all exceptions" enabled in the F12 debugger tools.
I've then clicked on the link that opens page B. I'm then shown a dialog asking me if I want to debug with Visual Studio 2010 or Visual Studio 2012. Why didn't it just open the JavaScript in the F12 debugger tools?
To make it even weirder, if I close the F12 developer tools and click the link for page B I don't even get the dialog asking me if I want to debug with VS 2010 or VS 2012.
-Eric
Upvotes: 1
Views: 1494
Reputation: 1936
The dialog you're seeing is the "Just in Time" debugger dialog. It is shown on two conditions:
IE was designed this way to allow other debuggers, such as Visual Studio, to attach an debug IE rather than restricting it to just the F12 tools. As you have Visual Studio installed you are seeing the dialog that Visual Studio installs (You can read more on msdn).
The easiest solution would be to launch F12 on page b and it should work. Unfortunatley as you need to debug startup code you'll need to refresh page b in order to run that code as F12 can't be open before. That assumes you can refresh page b. If not it's a bit trickier but there should be a way. (Just let me know!)
Upvotes: 1