Startup JS debugging (sometimes) possible via Browser Toolbox

Dave Townsend dtownsend at mozilla.com
Wed Mar 8 19:11:59 UTC 2017


This is awesome, thanks for implementing this!

On Wed, Mar 8, 2017 at 11:09 AM, J. Ryan Stinnett <jryans at gmail.com> wrote:

> 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
>
> _______________________________________________
> firefox-dev mailing list
> firefox-dev at mozilla.org
> https://mail.mozilla.org/listinfo/firefox-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/firefox-dev/attachments/20170308/1a55a977/attachment.html>


More information about the firefox-dev mailing list