Bypass Debugger
# Bypass Debugger
# Description
Bypasses repeated debugger pauses. If the bypass fails or causes errors, use Firefox and ignore breakpoints.
# When to use it
Enable this script if the page repeatedly pauses on debugger statements after you open DevTools.
After enabling the script, the bypass succeeds and the repeated pauses stop:

# Frequently asked questions
If debugger pauses continue or the Console reports errors after you enable the script, one of the following may be the cause.
# Hard-coded debugger statements
For example, a timer can repeatedly execute a debugger statement:
setInterval(function() {
debugger;
}, 1);
2
3
The result:
The page still pauses on debugger after the script is enabled.
This happens because the script does not hook timer methods such as setInterval. Many websites use these methods, and hooking them can introduce unexpected errors. You can still bypass this case easily:
Right-click the line containing
debugger:
Click Never pause here:

The repeated debugger pauses will stop:

# Errors caused by eval scope changes
The original script hooks eval, because it can also be used to trigger repeated debugger pauses:

However, hooking eval can change its scope. Console errors like those below after enabling the script indicate this problem:
I investigated this issue in 2024. For details, see my article: JavaScript Reverse Engineering โ A Closer Look at Scope Issues After Hooking eval.
I will not go into detail here; there is currently no solution to this issue.
# Other issues
Some websites may use anti-debugging techniques that this script does not cover. In that case, switch to Firefox and ignore debugger statements while debugging. You can also contact me with an example (WeChat: I-0xsdeo).
# How it works
The three main mechanisms used to trigger repeated debugger pauses are:
eval
Function
Function.prototype.constructor
This script hooks all three to bypass repeated debugger pauses.
For a more detailed explanation, see my earlier article: JavaScript Reverse Engineering โ Bypass Debugger.