Eclipse-CDT: How do I configure the debugger to stop on an exception?

Alex Black picture Alex Black · Jul 10, 2009 · Viewed 8.6k times · Source

This might be a GDB question.. but I'd like to run my app in the debugger and have the debugger break when an exception is thrown, so I can see where the code is and what its doing at that time.

I do this often in Visual Studio using the Debug -> Exceptions dialog, checking the 'Thrown' column beside the type of exceptions I'd like to stop on.

  • Alex

Answer

dfdssg picture dfdssg · Nov 18, 2011

You can get the equivalent of gdb catchpoints in eclipse by:

From breakpoints view, invoke action(small triangle pointing downwards near the maximize button) -> Add Event Breakpoint (C/C++) -> Exception Thrown.