web-ext icon indicating copy to clipboard operation
web-ext copied to clipboard

`web-ext run` should allow for starting with debugger enabled.

Open sblask opened this issue 8 years ago • 8 comments

Feature request: it would be great if web-ext run would have a --debugging-enabled flag so I don't have to go to about:debugging and click on debug for my add-on on every start.

sblask avatar Jan 18 '17 23:01 sblask

Yes, this would be nice, especially since auto-reloading exits the debugger (at least it used to but I can no longer find the bug).

@rpl would we need a Firefox patch for this? Maybe to use a remote actor to turn this on? If so, perhaps we should file the bugs ASAP.

kumar303 avatar Jan 19 '17 04:01 kumar303

@sblask :+1:

@kumar303 the WebExtensions Addon Debugger should survive auto-reloading (the old one didn't, but when I worked on the new one I took care of this scenario)

Nevertheless I totally agree that it would be helpful if we could "auto-open" the tool on the installed addon without the need to start it manually, I'm pretty sure that we need a patch for it, as an example we could define an additional {openAddonDebugger: true} parameter on the addons RDP actor installTemporaryAddon method, which will open the addon debugger as soon as the addon has been installed.

rpl avatar Jan 19 '17 11:01 rpl

@rpl yeah, I like installTemporaryAddon(path, {openAddonDebugger: true}) -- can you file a bug so it can get into triage?

kumar303 avatar Jan 19 '17 15:01 kumar303

@kumar303 sure thing :+1:

rpl avatar Jan 19 '17 15:01 rpl

bump on this. Is web-ext still a focus given Mozilla's recent strategy pivot?

yangwen2 avatar Feb 02 '21 16:02 yangwen2

bump on this. Is web-ext still a focus given Mozilla's recent strategy pivot?

This tool is actively maintained :slightly_smiling_face: The priority of this particular issue is still ‘enhancement’ and not currently being worked on.

A reasonable path forward for this issue would be interest from a contributor to work on it (we didn't mark it as a good first bug because implementing it will likely require a more experienced contributor).

rpl avatar Feb 02 '21 16:02 rpl

Feature request: it would be great if web-ext run would have a --debugging-enabled flag so I don't have to go to about:debugging and click on debug for my add-on on every start.

Here's a solution that is working very well for me.

I take the URL found when opening via about:debugging -> click on inspect and make this the starting page for web-ext via --start-url. This page should have developer tools open automatically. While I'm at it, I also use --pref to make sure that the Console tab is selected by default (the default tab is Inspector.

web-ext run \
  --target=firefox-desktop \
  --pref=devtools.toolbox.selectedTool=webconsole \
  --start-url "about:devtools-toolbox?id=EXTENSION_ID_HERE&type=extension"

Flags found here: https://github.com/mozilla/web-ext/blob/19fdd3a57638b178cc8e9555e4d891107e7c416d/src/program.js#L643-L658

curtisbelt avatar Nov 17 '21 04:11 curtisbelt

Looks like this issue has been fixed by https://github.com/mozilla/web-ext/pull/2488

willdurand avatar Sep 12 '22 11:09 willdurand