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 debugger tokens 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 toString outputs.
  • Runs at document-start so hooks are ready before page scripts execute.

Installation

  1. Install a userscript manager such as Tampermonkey or Violentmonkey.
  2. Copy the contents of debugger-bypass.user.js.
  3. Open the userscript manager dashboard, create a new script, and paste the code.
  4. Save the script and ensure it is enabled for the target domains.

Usage

  1. Reload the page that enforces anti-debugger checks.
  2. Open developer tools. The console should log [debugger-bypass] hooks injected (eval / setTimeout / setInterval / Function) when the script is active.
  3. Set breakpoints as usual; statements inserted at runtime should no longer pause execution.

Compatibility Notes

  • The script uses unsafeWindow when 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.