In earlier versions of Visual Studio, you can use the [DebuggerStepThrough] attribute to ignore an exception in a special method that cannot be avoided for some reason (network exceptions, for example, or maybe unsuccessful parsing). (See This topic: Do not stop the debugger with this THAT exception when it is thrown and caught )
Now, Visual Studio shows me an exception in the calling function without an attribute, even if it is already caught and processed.
Example:
static void Main(string[] args) { ExceptionalMethod(); } [DebuggerStepThrough] static void ExceptionalMethod() { try { throw new Exception("BAM"); } catch { } }
This code should not stop in VS 2013 or below. Same behavior with DebuggerHidden.
Is there a new trick to ignore this one exception? Without ignoring all the exceptions to this type of course?
source share