0

I have Debug => Exceptions => Break when an exception is: CLR Exception checked:

CLR first time exception

However Visual Studio does not break on the shown exceptions. Any ideas why this might be happening? I've tried cleaning / rebuilding and restarting. I've tried checking Just my code and breaking on User-unhandled exceptions but nothing has helped.

majjam
  • 1,286
  • 2
  • 15
  • 32
  • Taking a wild guess here, but I've had a strange problem with that where when I started to debug the checkmarks were gone. I had to re-check while debugging. (I.e. set a dummy `int n = 0` breakpoint and go to the menu and re-check) – namezero May 11 '15 at 14:58
  • You'll need to start by explaining why these first-chance exception notification messages appear in the Immediate window. That is highly unusual, they are normally displayed in the Output window. Disable add-ins, etcetera. – Hans Passant May 11 '15 at 15:01
  • First of all uncheck Just my code. Then make sure that you are attaching the process as .NET 2 / .NET 4.0 – Ganesh R. May 11 '15 at 15:07
  • Thankyou for your suggestions, the exceptions were redirected to the immediate window via [Redirect all Output Window text to the Immediate Window in Tools - Options... - Debugging - General](http://www.helixoft.com/blog/how-to-disable-a-first-chance-exception-of-type-messages-in-vs-2005.html). @namezero the checkbox was still checked even after breaking on a regular exception. – majjam May 11 '15 at 15:22
  • @Ganesh R. I can attach a separate process to this one to catch the exceptions, but I thought they could break from within the same VS instance? – majjam May 11 '15 at 15:23
  • 1
    No idea why, but disabling all break when an exception checkboxes (in the above menu) rebuilding / rerunning, then re-enabling the CLR exceptions checkbox worked. I'm now throwing first chance exceptions again. – majjam May 11 '15 at 15:37
  • @bamie9l Good to hear you solved it. Sometiumes the re-ticking appears necessary, too. Overall it seems that the actual problem is a user setting file that can somehow get corrupted/ Maybe what you did un-corrupted it. – namezero May 11 '15 at 16:19

0 Answers0