Monday, October 16, 2006

Break When an Exception is Thrown

A colleague of mine recently had an issue with a .NET exception that was caught in a try catch block, not reported and subsequently caused issues. Make sure you have the Exceptions... option in the Debug menu. If not, add it using the Customize... option in the Tools menu. Then, to break whenever an exception is thrown follow these simple steps -

  1. On the Debug menu, click Exceptions...
  2. In the Exceptions dialog box, select Thrown for Common Language Runtime Exceptions.
It's possible to limit the exception types by expanding the tree and checking specific options. Pretty neat I thought.

No comments: