2

If I tell Visual Studio to break on all Common Language Runtime Exceptions (so that it will break on the point any Exception is thrown), or if an unhandled Exception is thrown, I see no details about the thrown Exception, such as the stacktrace, inner exceptions, etc:

A lack of exception details

If I then place the offending code in a try-catch block, I can then view the Exception details in the caught Exception object (ie Exception ex), so I know the Exception information must be accessible...so why does it not show in Visual Studio's Exception Helper?.

I've gone through the settings for the project and ensured that Debugging information is set to Full, and that the "Enable developer instrumentation (debugging and profiling)" checkbox is checked.

I'm running Visual Studio 2017 v15.7.1.

Note: I'm aware that similar questions have been asked in the past, however the first question's answer is merely a workaround for handling them in code (I already have a global exception handler), and in the second question I'm already running a newer version of Visual Studio than the version the issue was purportedly fixed in. I also found a thread on the Xamarin forums that appears to be discussing the issue to no avail.

How can I resolve this issue to view Exception details in the Exception helper in Visual Studio?

Interminable
  • 1,338
  • 3
  • 21
  • 52
  • Is this exception thrown on a background thread by any chance? If so, while stopped in the debugger try pressing F10 and see if that makes any difference. – Matthew Watson May 14 '18 at 08:59
  • @MatthewWatson I don't think so. If I straight-up do `throw new System.Exception("Stuff", new System.Exception("Inner exception stuff"));` in `OnCreate()` in an `Activity`, I get no details there either (ie there's no sign of the inner exception in the Exception helper), just the initial "Stuff" message. – Interminable May 14 '18 at 09:08
  • The Mono soft debugger (`sdb`) is not the same as the .NET Framework Debugger (MDbg/SOS). – SushiHangover May 14 '18 at 09:18
  • @Interminable, Could you view the detailed exception messages in your side after you disable the Use Managed Compatibility Mode option? Any update for this issue? – Jack Zhai May 31 '18 at 02:39

1 Answers1

1

Please disable "Use Managed Compatibility Mode" under Tools->Options->Debugging->General. View the result. As far as I know, if we enable it, it would not show the "View Details" option in Exception window.

Jack Zhai
  • 6,230
  • 1
  • 12
  • 20