Selecting exceptions for the debugger to catch (integrated debugger)

Usually, if an exception is thrown while a program is running, and the program does not catch it, the IDE Debugger opens and the offending thread is suspended.  However, if the program does catch it, the debugger will not open, and the program will continue.   Even if the program outputs the stack trace when it catches the exception, you might not be able to determine its origin.

To make debugging easier, the IDE debugger lets you effectively set breakpoints on exceptions, so that any time an exception of a certain type is thrown, the debugger suspends the thread that threw it and opens the Debugger browser.  You can then see where the exception is happening.

To select a type of exception to be caught by the debugger:

  1. In the integrated debugger, go to the Exceptions page.
  2. From the list of available exception types, select the types of exceptions you want to set breakpoints on by enabling their check-boxes. 
  3. Click OK.

Now when you run a program that throws an exception (of the type you selected), the thread is suspended and the Debugger browser opens, regardless of whether the program catches the exception.

Changing the display order of the exceptions and selecting groups
You can select how the exception types are listed by clicking buttons in the toolbar:  by exception type name nidxbycl.gif (1006 bytes), by package name nidxbypk.gif (1016 bytes), or by hierarchy nidxbyhi.gif (1016 bytes)

You can also select or deselect groups of exceptions:  select all nidxsall.gif (1031 bytes), deselect all nidxsnon.gif (1025 bytes), the select the current exception and all that inherit from it nidxschd.gif (1050 bytes), and deselect the current exception and those that inherit from it nidxdchd.gif (1042 bytes).

 

Example: "Opening the debugger when an exception is thrown"

ngrelc.gif (533 bytes)
The integrated debugger

ngrelt.gif (466 bytes)
Setting breakpoints in source code