| Startup JS debugging (sometimes) possible via Browser Toolbox | J. Ryan Stinnett | 08/03/17 11:09 | 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 |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | Dave Townsend | 08/03/17 11:12 | This is awesome, thanks for implementing this!
> _______________________________________________ > firefox-dev mailing list > firef...@mozilla.org > https://mail.mozilla.org/listinfo/firefox-dev > > |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | Jared Wein | 08/03/17 11:16 | This is very useful! Thank you for adding this!
|
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | Kris Maglione | 08/03/17 11:22 | On Wed, Mar 08, 2017 at 01:09:10PM -0600, J. Ryan Stinnett wrote:>... >To put it one way: if we are ever in the same room, I owe you all of your drinks for the night. |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | Panos Astithas | 09/03/17 00:19 | You almost completely resolved the 4-year-old bug 814298, yay! I now wonder
if this makes it easier to improve mochitest debugging per bug 929535. |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | J. Ryan Stinnett | 13/03/17 09:49 | On Thu, Mar 9, 2017 at 2:18 AM, Panos Astithas <pa...@mozilla.com> wrote:Thanks for the pointers to these bugs. Bug 814298 stills needs breakpoint persistence to be fully resolved, but this will hopefully appear soon in the new debugger UI. For mochitest debugging (bug 929535), this new flag does seem to be sufficient to allow the tests to run automatically while still debugging, so I've just landed a fix there. - Ryan |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | Gijs Kruitbosch | 13/03/17 09:50 | On 13/03/2017 16:48, J. Ryan Stinnett wrote:The new debugger UI isn't enabled for chrome debugging, though. What's blocking that? (And do we support watches in the new debugger UI yet? :-) ) ~Gijs |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | Jared Wein | 13/03/17 12:05 | Yes, we support watches in the new debugger UI now. The new debugger UI is
used by default in the Browser Content Toolbox, and it is pretty nice and shiny. Cheers, Jared On Mon, Mar 13, 2017 at 12:50 PM, Gijs Kruitbosch <gijskru...@gmail.com> wrote: |
| Re: Startup JS debugging (sometimes) possible via Browser Toolbox | J. Ryan Stinnett | 13/03/17 12:26 | On Mon, Mar 13, 2017 at 2:04 PM, Jared Wein <jw...@mozilla.com> wrote:New debugger UI is on for Browser Content Toolbox, but at the moment, it's still off for Browser Toolbox. It was disabled for Browser Toolbox ~6 months ago in bug 1300820, but those issues appear to have been resolved since then. I filed bug 1346902 to enable it again for Browser Toolbox. - Ryan |