Using Chrome JavaScript Debugger / How to break on page loading events

In Chrome's Developer Tools, go to the Sources tab. On the right, open up Event Listener Breakpoints, and you can set breakpoints on events.

It sounds as if you'll want to set your breakpoint on DOMContentLoaded, which is under the DOM Mutation section.

After you do this, reload the page and you'll end up in the debugger.


Try putting debugger; in your code. That also works in FF's Firebug


Later versions of Safari and Firefox should work properly with breakpoints across reloads, but one needs to be sure that the query is exactly the same between requests. ExtJS 4, for instance, adds a _dc=<epoch> that will disable the cache.

To stop that behavior, add the following:

Ext.Loader.setConfig({
    disableCaching: false,
    enabled: true
});

Hope that helps!