Bookmarklet to debug before javascript navigates using pushState
jsjavascript:
delete window.history;
window.history = { pushState(...args) { debugger; } };
Update:
easier with Navigation API now:
jsjavascript:
navigation.addEventListener('navigate', (...args) => { debugger; });