Skip to content

Instantly share code, notes, and snippets.

@adokce
Created May 27, 2024 13:05
Show Gist options
  • Save adokce/5a8778f20b69896581fbb451e427c8e2 to your computer and use it in GitHub Desktop.
Save adokce/5a8778f20b69896581fbb451e427c8e2 to your computer and use it in GitHub Desktop.
/**
* Delayed Debugger Script
*
* This script sets a 2-second delay before triggering the debugger in your browser's developer tools.
* It is useful for debugging hover states and other JavaScript-controlled interactions that don't
* respond to the browser's built-in hover emulation tools.
*
* Usage:
* 1. Open your browser's developer tools (press F12 or Ctrl+Shift+I).
* 2. Navigate to the "Console" tab.
* 3. Paste the script into the console and press Enter.
*
* The script will pause execution and activate the debugger after 3 seconds,
* allowing you to inspect and debug the current state of your application.
*/
setTimeout(() => {
debugger;
console.log("Debugger activated");
}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment