Open Bug 899054 (dbg-addon) Opened 11 years ago Updated 5 months ago

[meta] Add-on debugging

Categories

(DevTools :: Debugger, task, P5)

x86_64
Linux
task

Tracking

(Not tracked)

People

(Reporter: ejpbruel, Unassigned)

References

(Depends on 11 open bugs)

Details

(Keywords: meta)

Attachments

(1 file)

524 bytes, application/octet-stream
Details
Now that the remote browser debugger can attach to add-on scripts, it is possible to debug add-ons with it. Doing so is still cumbersome, however, since the browser debugger attaches to all globals regardless of whether they are part of a specific add-on or not. What we want is for the browser debugger to attach to a specific add-on, rather than the entire browser.

In terms of implementation, our proposal is to create a specialization of the chrome thread actor used by the debugger, which we will call an add-on thread actor (bug 898559). In contrast to the chrome thread actor, which adds *all* globals as debuggees, an add-on thread actor only adds globals that are part of a given add-on.

In addition, the root actor should be extended to respond to a request for a list of add-ons by sending a reply containing a list of add-on thread actors, one for each (active) add-on. Clients can then attach to/detach from these add-on thread actors on an individual basis.

The add-on thread actor must be able to tell which globals are part of a given add-on and which are not. To facilitate this, we propose implementing a metadata API (bug 898559) which allows globals to be tagged as such.

Once we've implemented add-on thread actors, we propose to extend the add-on manager UI with an option 'debug this add-on' for each active add-on. Clicking this option will cause the browser debugger to be started for a specific add-on (by passing it the add-on ID as a parameter).
Depends on: 899052
Depends on: 898559
Priority: -- → P5
(In reply to Eddy Bruel [:ejpbruel] from comment #1)
> In terms of implementation, our proposal is to create a specialization of
> the chrome thread actor used by the debugger, which we will call an add-on
> thread actor (bug 898559). In contrast to the chrome thread actor, which
> adds *all* globals as debuggees, an add-on thread actor only adds globals
> that are part of a given add-on.

For anyone else reading and being confused like me: I think the bug number was meant to be bug 899052.
Assignee: nobody → rFobic
Assignee: rFobic → jsantell
Depends on: 986108
Depends on: 986586
Depends on: 986755
Depends on: 986838
Depends on: 986853
Depends on: 987890
Alias: addon-dbg
Depends on: 990074
Depends on: 990256
Depends on: 990258
Depends on: 991762
Depends on: 992244
Depends on: 993029
Depends on: 993533
Depends on: 1003252
Depends on: 1005193
Depends on: 1006102
Depends on: 1007428
Depends on: 1007732
Depends on: 1015545
Depends on: 1016046
Assignee: jsantell → nobody
Summary: [Meta] Implement an Add-on Debugger → [meta] Add-on debugging
Depends on: 953414
Depends on: 1065952
Depends on: 1011760
Alias: addon-dbg → dbg-addon
Depends on: 991179
Depends on: 1075104
Depends on: 1112293
Depends on: 1027047
Depends on: 1116160
Depends on: 1116163
No longer depends on: 1116113
Depends on: 1116276
Depends on: 1265636
Depends on: 1283363
Product: Firefox → DevTools

Honza, Harald, could you triage this meta?

Flags: needinfo?(odvarko)
Flags: needinfo?(hkirschner)
Depends on: 1288697
Depends on: 1250623
Depends on: 1206389
Depends on: 1126273
Depends on: 1486416
Depends on: 1418547
Depends on: 1519288
Depends on: 1398911
Depends on: 1112089
Depends on: 1413872
Depends on: 1539294
Type: defect → task

Done
Honza

Flags: needinfo?(odvarko)
Flags: needinfo?(hkirschner)
Attachment #9281940 - Flags: sec-approval?
Attachment #9281940 - Flags: data-review+
Attachment #9281940 - Flags: checkin+
Attachment #9281940 - Flags: approval-mozilla-beta?
Attachment #9281940 - Flags: a11y-review+
Performance Impact: ? → ---
Severity: normal → S3
a11y-review: requested → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: