With bug 1275942 in Firefox 55, a new Firefox CLI option was added:
`--wait-for-jsdebugger`.

Example usage:

1. Add "debugger;" to top of browser/base/content/browser.js
2. $ ./mach run --jsdebugger --wait-for-jsdebugger
3. Browser Toolbox opens, pausing Firefox startup at the added line

This triggers Firefox to wait until the debugger connects, which makes it
possible to debug some Firefox startup JS code paths. (Some startup paths
might run before the DevTools command line handler, so for the moment they
won't pause. This could be improved in the future by moving the CLI handler
earlier in startup.)

(If you're wondering why an extra flag was added, this mode makes the
Browser Toolbox use a different default window in the Inspector, which
might confuse people if it was the default.)

Let me know if it's useful and / or you see room for improvement.

- Ryan
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to