Catch exception in debugger

Antoche N at A.c
Mon Nov 25 12:28:28 PST 2013


In gdb, for C/C++ programs, 'catch throw' and 'catch catch' allow
the user to break on exception throwing and exception catching,
respectively. See
https://sourceware.org/gdb/onlinedocs/gdb/Set-Catchpoints.html

This doesn't seem to work in D. The only way I've been able to
catch an exception in the debugger is to add a dummy try/catch
statement in the code and break on it, which is really
cumbersome. I don't know how I would break on a throw statement
if I didn't know the exact location of the throw in the first
place.

Any better way to achieve this?


More information about the Digitalmars-d-learn mailing list