Skip to content

Instantly share code, notes, and snippets.

@lcustodio
Created August 31, 2015 10:34
Show Gist options
  • Save lcustodio/00834833828e1756d2a8 to your computer and use it in GitHub Desktop.
Save lcustodio/00834833828e1756d2a8 to your computer and use it in GitHub Desktop.
In order to find where any alert box comes from.
//Open the debugger console, type the following:
var _alert = window.alert;
window.alert = function () { debugger; _alert.apply(this, arguments); }
//Do not reload the page!
//When the alert will be called, it breaks in the debugger and you have access to the call stack.
//Credits to @ArnaudBuchholz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment