backtrace-debug

backtrace-debug is a built-in function in `C source code'.

(backtrace-debug LEVEL FLAG)

Set the debug-on-exit flag of eval frame LEVEL levels down to FLAG.
The debugger is entered when that frame exits, if the flag is non-nil.