How to Check if Godot Is Paused at Breakpoints

Problem Statement
We need to check whether Godot pauses at breakpoints. However, Godot does not provide a direct API for this.
The Tricky Way
If the program pauses at a breakpoint, the engine’s timer also pauses and we can check the delta time inside a _process function.
If now_tick - last_tick > PAUSE_THRESHOLD, this may be because the program has paused at breakpoints.
The DebugHelper class:
| |
It could be an AutoLoad script. Alternatively, you can use signals or your custom event system to notify other systems when it detects potential debug pauses.