How to debug Firefox XUL launch (on Windows)

I have a problem that makes Firefox behave strangely during startup.
(In particular, it displays the message β€œFirefox seems slow ... to ... launch,” although I did not install any new extensions or anything like that.)

The function that displays this _showSlowStartupNotification message in browser/components/nsBrowserGlue.js , which is called from _trackSlowStartup , which in turn is _onFirstWindowLoaded .

I want to debug this. How can i do this?

I can easily debug Firefox binaries using the WinDbg and Mozilla symbol server. But that is not what I want. I want to debug XUL, not C ++.

I can debug XUL if I turn on the Browser Toolbox , but only after launch. Even if I set devtools.debugger.prompt-connection to false and run firefox.exe -jsdebugger to immediately open the browser toolbar, I only gain access to it after the startup code has already been executed. Setting a breakpoint on an interesting function does not help, because they are not constant; restarting Firefox does not debug the internal XUL debugger.

So, any suggestions? Is there a way to debug Firefox XUL from the start?

+6
source share

All Articles