Skip to content

Instantly share code, notes, and snippets.

@xsscx
Created March 2, 2017 17:20
Show Gist options
  • Save xsscx/e8d3452e9861283bffeb6763cb194fd1 to your computer and use it in GitHub Desktop.
Save xsscx/e8d3452e9861283bffeb6763cb194fd1 to your computer and use it in GitHub Desktop.
Javascript Debugging Break on onhashchange
['onhashchange', 'onhashchange'].forEach(function (evName) {
window.addEventListener(evName, function () {
debugger; // Chance to check everything right before the redirect occurs
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment