views:

90

answers:

2

I have a C# WPF app that makes use of a number of assemblies that use native code. My problem is that most of the time, when my application throws an exception, the Exception Assistant does not come up - just the Break/Continue/... dialog. I of course have the Exception Assistant turned on in the Visual Studio options, and I have the particular exception that is being thrown (System.Windows.Markup.XAMLParseException ) selected in the Debug::Exceptions dialog. I need to be able to drill down to the inner exception being thrown. I have seen the EA come up on occasions - just not reliably. I am fairly new to C# and managed development, so any suggestions, no matter how basic, would be appreciated.

+1  A: 

If you just need access to the inner exception you can do so this way. Hit break when the dialog comes up. Then select Debug -> Windows -> Locals. At the top of the locals window you should see a value named $exception. That is the current exception and drilling down into that variable will allow you to access the inner exception.

JaredPar
A: 

I think I am seeing the same problem. I develop on two monitors, when visual studio 2k8 is running on monitor 1, the exception assistant pops up and works correctly. When visual studio is on monitor 2, the assistant briefly flashes on monitor 1 and then disappears.

My 'fix' is to use only monitor 1. Other factors that may be causing this: I'm running ultra-mon to manage my desktops and monitor 2 is setup on the left side of monitor 1.