debug-on-quit

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


Documentation:
Non-nil means enter debugger if quit is signaled (C-g, for example).
Does not apply if quit is handled by a `condition-case'.

You can customize this variable.