views:

171

answers:

3

Since a couple of weeks the Visual Studio (2008 9.0.30729.1 SP) Exception Assistant has stopt appearing while debugging using the C# IDE. Instead the old ugly and useless debug dialog comes up:

DebugExceptionModal

To make sure, I've checked the following:

  • "Tools / Options / Debugging / General / Enable the exception assistant" is on.
  • "Debug / Exceptions / Common Language Runtime Exceptions / Thrown" is on.
  • I reset my Visual Studio Settings.
  • I googled.
  • I checked all relevant stackoverflow questions.

How can I get the Exception Assistant back? Who gives me the golden tip?

+1  A: 

It's a real shot in the dark but it might be worth trying uninstalling some recent Windows updates. The recentish KB978037 update broke debugging of console mode programs, so this has made me (for one) a bit suspicious of them now:

http://social.msdn.microsoft.com/Forums/en-US/vsdebug/thread/e6d4a4f5-7002-401a-90e1-6174d7f9e3ca

To be fair, this is the first time I've noticed anything really awful arising from a patch, but it's worth a shot. (If you turn off the automatic install of updates, then you can try this stuff out without too much fear. Windows Update seems to re-download any patches you uninstall so you can easily put them back again.)

brone
Thanks for your response. Checking this out will be the first thing I will do Monday morning, when I'm back in my little cubicle :-)
Steven
I wasn't able to find the patch that caused it. Still, thanks for your response.
Steven
+1  A: 

"Debug / Exceptions / Common Language Runtime Exceptions / Thrown" is on.

That's your problem, makes the debugger stop on the first chance exception. Very useful, but not if you prefer the exception assistant. Turn it off.

Well documented question btw, my compliments.

Hans Passant
Turning it off has no effect :-(
Steven
Hmm, it is exactly what will happen when you've got the Thrown checkbox turned on. How got it turned on in the first place?
Hans Passant
Okay, I have to correct myself. There is an effect. The difference is that the break / continue screen doesn't popup anymore. But the Exception Assistant doesn't show up, for instance when putting a breakpoint in a catch clause, I can't however over the exception to get the Exception Assistant (red exclamation mark icon).btw. I turned that setting on myself, because I like to get notified when an exception happens. Exceptions often indicate bugs :-). However, I'm used to getting a much fancier popup.
Steven
@Steven: the Exception Assistant only pops up when there is an *unhandled* exception. By definition, it cannot pop up in a catch clause. The exception isn't unhandled yet. Inspect the variable you used in the catch statement to see the exception properties.
Hans Passant
@nobugz: Perhaps I described it not well enough, but the Exception Assistant never pops up and neither does VS show the Exception Exclamation Mark Icon. I know I can look at the exception by hovering the variable, but it is much harder to get to the proper information this way.
Steven
@Steven: delete all your try/catch statements if you want to see the EA.
Hans Passant
@nobugz, he's talking about something different. Your suggested setting controls *when the dialog appears.* Given some case where it does appear, what he's asking about is *which dialog* appears. VS adds the exception dialog as an add-in; when that add-in is broken (or not loaded) it falls back to the "old" exception dialog from 2005.
Craig Stuntz
Thanks Craig, you are right on. This is exactly what I want. I didn't know it was an add in. That explains a lot.
Steven
+1  A: 

Had exactly the same problem, so i found this post here. I did two things, don't really know what actually solved this...

First was applying the VS SP1

Second was going to Tools -> Import and Export Settings -> Reset all settings

and then selecting c# as the language setting. The previous user had c++, so there might be a connection.

SOLVED

Dimos