I use a WebBrowser control in my Winforms application. When I navigate to a Url that causes a JavaScript exception the Just-In-Time (JIT) debugger window shows up asking if you want to debug this exception:
An Unhandled exception ('Object expected') occured in (application)
This happens (in Release mode) even though I set the ScriptErrorsSuppressed on the WebBrowser control to True. I could only reproduce the issue when Visual Studio was installed so I assume that the JIT debugger catches the exception and then ask if you want to Debug.
How can I prevent this from happening? What I am trying to do is catch the exception or disable JIT debugging for my application without having to reconfigure IE or Visual Studio.
Some of our users have Visual Studio installed and these JIT popups make our application unusable.