Mode may be trace, debug, notrace or nodebug (nodebug is a synonym for notrace). Int_Id may be a free variable, a interrupt number or a interrupt name (see current_interrupt/2 for correspondence between interrupt number and interrupt name).
When Int_Id is a free variable, all the interrupt handlers are set to the debugger mode Mode.
When an interrupt handler has its flag set to trace or debug, each time the handler is called the debugger will be switched on in this mode until the end of the handler.
The debugging of the handler is independent to the debugging of the interrupted execution. This means that the debugger does not need to be switched on in the interrupted execution to be able to trace the handler and that the invocation number and level of the handler always starts from 1 and 0 respectively. It also means that the current debugger mode of the interrupted execution and debugger mode of the interrupt handler does not influence each other.
Success: [eclipse]: set_interrupt_handler(int, writeln/1). yes. [eclipse]: set_interrupt_flag(int, trace). yes. [user]. p :- true, interrupt(2), true, fail. user compiled 152 bytes in 0.00 seconds yes. [eclipse]: p. % debugger is off in the execution of p/0 B (1) 0 CALL writeln(2) (dbg)?- creep 2 B (1) 0 EXIT writeln(2) (dbg)?- creep no. [eclipse]: spy fail. spypoint added to fail / 0. yes. Debugger switched on - leap mode [eclipse]: p. % debugger is in leap mode in the execution of p/0 % debugger is in creep mode in the handler B (1) 0 CALL writeln(2) (dbg)?- creep 2 B (1) 0 EXIT writeln(2) (dbg)?- creep % debugger is back in leap mode B+(5) 1 CALL fail (dbg)?- creep B+(5) 1 FAIL fail (dbg)?- creep (1) 0 FAIL p (dbg)?- creep no. Error: set_interrupt_flag(2, M). (Error 4). set_interrupt_flag(2, "trace"). (Error 5). set_interrupt_flag("int", trace). (Error 5). set_interrupt_flag(int, skip). (Error 6). set_interrupt_flag(123, trace). (Error 6).