debug-on-event is a variable defined in `C source code'.
Its value is

Enter debugger on this event. When Emacs
receives the special event specified by this variable, it will try to
break into the debugger as soon as possible instead of processing the
event normally through `special-event-map'.

Currently, the only supported values for this
variable are `sigusr1' and `sigusr2'.

You can customize this variable.

This variable was introduced, or its default value was changed, in version 24.1 of Emacs.