views:

28

answers:

1

I wanted to set breakpoint in the dll code so I introduced the statement "_asm int 3;". IE is supposed to open a dialog box saying that an unexpected exception has occured, and whether to close or debug. But it simply cuts down the window. The dll is a _Debug version not _Release version. Another thing I noticed is that using the "debugger;" statement in the javascript code also causes the same behaviour - window dies without notice. Why is this happening?

+2  A: 

JIT debugging might be disabled. In your Visual Studio options, under Debugging > Just-In-Time, check the Native and Script options.

As an aside, you should probably call DebugBreak() instead of _asm int 3. It's clearer that way.

Frédéric Hamidi
+1 for DebugBreak().
jeffamaphone
I had tried DebugBreak(), that also caused the crash.
Hugh Darling
So, was that a JIT configuration problem after all? :)
Frédéric Hamidi
I don't have the Debugging menu in my Visual C++ 98. This help I found http://explodingcoder.com/blog/content/visual-studio-fail-how-not-debug-net-exception-handling tells to go to Tools menu, select "Import and Export Settings" for choosing Visual Studio Development Settings, but in my Tools menu I don't find any such item "Import and Export Settings". I also tried going to Tools->Customize->Category:Menus and selected "Debug" from the "Commands" list shown, and it only brings in 3 new menu items - Image, Layout and Query, for God's sake. I had tried DebugBreak(), that also caused the crash.
Hugh Darling
You don't have a JIT-capable environment. If at all possible, install a more recent IDE, e.g. the free [Visual C++ Express](http://www.microsoft.com/express/downloads/#2010-Visual-CPP).
Frédéric Hamidi
One more thing is that it had breaked at the debug point and opened the visual studio for debuging, a couple of times in the past, and then all of a sudden it started crashing. Then someone suggested to try IE7, and after I downgraded to IE7, it worked for a couple of times, and then afterwards just started crashing the window without prompting. If I don't have a JIT capable environment, how could it have worked sometimes?
Hugh Darling
Well, you *did* have a JIT-capable environment before, but it's broken now :)
Frédéric Hamidi
Not quite. It has just now started breaking and opening the Visual studio all of a sudden. One doesn't know when it will start crashing silently again.
Hugh Darling