16

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
(source: msdn.com)

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?

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Steven
  • 166,672
  • 24
  • 332
  • 435

6 Answers6

15

You can also see this dialog if you have enabled Debuggers > Native Code in your project setting. If you turn it off it should work again.

pvasek
  • 1,086
  • 11
  • 11
9

I've tried every solution suggested on this page, in vain. In my case, I tried uninstall and reinstall (yes, it was that annoying). And it still didn't solve the issue.

The only thing actually solved it, was unchecking "Enable unmanaged code debugging" from project properties => Debug:

unchecking "Enable unmanaged code debugging" from project properties -> Debug in VS2010

:-)

itsho
  • 4,640
  • 3
  • 46
  • 68
4

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
  • 41
  • 2
3

I had the same problem till I reset my Visual Studio settings (default to C#) then configured the debugger with the following settings:

  • Tools -> Debugging -> General -> Enable the exception assistant (CHECKED)
  • Tools -> Debugging -> General -> Unwind the call stack on unhandled exceptions (NOT CHECKED)

  • Tools -> Debugging -> General -> Enable Just My Code (CHECKED)

  • List item Tools -> Debugging -> General -> Show all members for non-user... (NOT CHECKED)
  • Tools -> Debugging -> General -> Warn if no user code... (CHECKED)

It looks as though an attempt to unwind the call stack on an unhandled exception is causing the debugger to crash in VS2013.

husterk
  • 184
  • 1
  • 10
  • Thank you so much. I had `Enable Just My Code` disabled for some reason which made VS no longer show Excpetion Assistant. – silkfire Nov 21 '16 at 10:29
2

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.)

  • 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 Mar 11 '10 at 22:05
  • I wasn't able to find the patch that caused it. Still, thanks for your response. – Steven Mar 15 '10 at 16:53
1

"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
  • 922,412
  • 146
  • 1,693
  • 2,536
  • Turning it off has no effect :-( – Steven Mar 11 '10 at 21:40
  • 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 Mar 11 '10 at 22:03
  • 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 Mar 12 '10 at 11:20
  • @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 Mar 12 '10 at 12:27
  • @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 Mar 12 '10 at 13:12
  • @Steven: delete all your try/catch statements if you want to see the EA. – Hans Passant Mar 12 '10 at 13:21
  • 2
    @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 Mar 12 '10 at 14:20
  • 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 Mar 12 '10 at 14:40