Reputation: 20014
I have a WinForms managed application which calls into a native C++ dll. I have enabled mixed managed and unmanaged debugging for the project and I'm able to step into the unmanaged code when debugging the project. I'm interested in JIT debugging because it's much faster to run the debug build outside the debugger and start debugging only after some assertion is violated. JIT Debugger works fine, when the exception is raised in the managed code. It also work when I JIT debug a standalone C++ application. But whenever an exception is raised inside the unmanaged code which is invoked from the WinForms application, the JIT debugger quits immediately after I initiate the debugging session. I have enabled all the JIT debuggers in Options/Debugging/Just-In-Time list. Is this scenario supported at all?
UPDATE
I've run some more tests, and I can see that
Upvotes: 0
Views: 281
Reputation: 20014
I feel stupid. The solution was right in front of me. There's an option in Visual Studio Just-In-Time Debugger dialog. It's called "Manually choose the debugging engines". Both Managed and Native engines have to be selected.
Upvotes: 0
Reputation: 521
I have gone through this situation before. I think the problem is that the exception is uncatched by debugger.
I did the following and maybe this would be helpful.
Click Debug->Windows->Exception Settings.
Or you just search "exception" at quick Launch.
You may find a lot of exception is not catched by default setting.
Upvotes: 0