Closed
Bug 1011760
Opened 11 years ago
Closed 7 years ago
Debugging evalled content scripts
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: jmjacobs, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
application/zip
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/34.0.1847.137 Safari/537.36
Steps to reproduce:
Use a PageMod in an addon. Use window.eval to add more scripts (containing //# sourceURL annotations) to the PageMod. Open the Addon Debugger.
Actual results:
Only the scripts that were initially included in the PageMod appear in the Addon Debugger.
Expected results:
The scripts dynamically added to the PageMod using window.eval should also appear in the Addon Debugger.
Note: I will gladly switch away from using window.eval if there is some other recommended method of dynamically adding scripts packaged with the addon to a PageMod.
Note: Issue 833744 is related, but I’m filing this issue separately because it’s specifically for addon content scripts injected on demand, a use case for which there are no known alternatives to window.eval. (My extension has a PageMod that begins as one small script file but, based on user behavior, can grow to include upwards of 50 script files.)
Updated•11 years ago
|
Component: Untriaged → Developer Tools: Debugger
Updated•11 years ago
|
Depends on: dbg-source
jmjacobs: can you attach a reduced test case? Thanks!
Reporter | ||
Comment 2•10 years ago
|
||
Sure. Here’s a small toy extension that demonstrates the issue.
Reporter | ||
Comment 3•10 years ago
|
||
Comment on attachment 8437058 [details]
content_script_eval.zip
Whoops, I forgot to include the //# sourceURL annotations.
Attachment #8437058 -
Attachment is obsolete: true
Reporter | ||
Comment 4•10 years ago
|
||
This version has the //# sourceURL annotations.
Note that button.js can be opened in the debugger, since it’s part of the initial PageMod declaration, but jquery.js and ui.js cannot because they are injected later using window.eval (after you click the button).
Comment 5•10 years ago
|
||
It seems to me as if this should be fixed automatically once bug 865313 lands.
Blocks: dbg-addon
Updated•10 years ago
|
Summary: Content scripts injected using eval should appear in the add-on debugger → Debugging evalled content scripts
Comment 6•7 years ago
|
||
Closing. PageMod is no longer supported and bug 865313 has landed so this should be done.
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•