Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debug Toolbox Panel created from WebExtension

16 views
Skip to first unread message

Christoph Dorn

unread,
Sep 20, 2017, 8:56:09 PM9/20/17
to mozilla-dev-d...@lists.mozilla.org
I am creating a Toolbox Panel from a WebExtension using `devtools.panels.create()` [1].

How do I inspect and debug the created panel? I cannot view the source nor reload it?

I only seem to be able to log messages to the Browser Console using `console.log()`.

Thanks
Christoph

[1] - https://developer.mozilla.org/en-US/Add-ons/WebExtensions/API/devtools.panels/create

P.S. I am trying to port the FirePHP Extension to a WebExtension.

Luca Greco

unread,
Sep 21, 2017, 7:20:50 AM9/21/17
to Christoph Dorn, mozilla-dev-d...@lists.mozilla.org
On Thu, Sep 21, 2017 at 2:56 AM, Christoph Dorn <chri...@christophdorn.com
> wrote:

> I am creating a Toolbox Panel from a WebExtension using
> `devtools.panels.create()` [1].
>
> How do I inspect and debug the created panel? I cannot view the source nor
> reload it?
>
>
Once a devtools panel has been created (a devtools toolbox has been opened
and the devtools panel
created from the extension has been selected, so that the extensions page
will be actually loaded),
the devtools panel will be listed in the "frames list" selector of the
WebExtensions Addon Debugging toolbox
(as well as the other existent extension pages from the same extension)

The following MDN doc page:

https://developer.mozilla.org/en-US/Add-ons/WebExtensions/
Debugging#Debugging_popups

contains a section that describes how to inspect a webextensions popup
(most of the steps are the same
for any other extension page, besides the step related to the button that
toggles the
ui.popup.disable_autohide preference which is specific to the "inspecting
popup" use case).

Christoph Dorn

unread,
Sep 22, 2017, 11:38:48 AM9/22/17
to mozilla-dev-d...@lists.mozilla.org

On September 21, 2017 04:20:50 am PDT, "Luca Greco"
<lgr...@mozilla.com> wrote:

> On Thu, Sep 21, 2017 at 2:56 AM, Christoph Dorn <chri...@christophdorn.com
>> wrote:
>
>> I am creating a Toolbox Panel from a WebExtension using
>> `devtools.panels.create()` [1].
>>
>> How do I inspect and debug the created panel? I cannot view the source nor
>> reload it?
>>
> The following MDN doc page:
>
> https://developer.mozilla.org/en-US/Add-ons/WebExtensions/
> Debugging#Debugging_popups

Perfect. That makes sense.

Thanks!
Christoph

0 new messages