Debugger Bypass UserScript
October 14, 2025 ยท View on GitHub
This repository contains a Tampermonkey/Greasemonkey userscript that strips debugger statements injected at runtime through eval, setTimeout, setInterval, or the Function constructor. The hooks restore normal debugging workflows on pages that try to trap developer tools.
Features
- Removes
debuggertokens from strings and anonymous functions before execution. - Preserves native implementations by delegating back to the original browser APIs.
- Avoids duplicate installation and retains original prototypes and
toStringoutputs. - Runs at
document-startso hooks are ready before page scripts execute.
Installation
- Install a userscript manager such as Tampermonkey or Violentmonkey.
- Copy the contents of
debugger-bypass.user.js. - Open the userscript manager dashboard, create a new script, and paste the code.
- Save the script and ensure it is enabled for the target domains.
Usage
- Reload the page that enforces anti-debugger checks.
- Open developer tools. The console should log
[debugger-bypass] hooks injected (eval / setTimeout / setInterval / Function)when the script is active. - Set breakpoints as usual; statements inserted at runtime should no longer pause execution.
Compatibility Notes
- The script uses
unsafeWindowwhen available so it operates on the page context even from sandboxed environments. - It adds a guard (
__debuggerBypassHooked__) to prevent multiple injections. - If a page overwrites the hooked functions after load, you may need to re-run the script or refresh.
License
Released under the MIT License. See LICENSE if available, or adapt to your preferred terms.