Source map is ignored when debugging popup script
Categories
(DevTools :: Debugger, defect)
Tracking
(Not tracked)
People
(Reporter: kirill.rakhman, Unassigned, NeedInfo)
References
(Blocks 1 open bug)
Details
(Whiteboard: needs-review)
Updated•7 years ago
|
Updated•7 years ago
|
Updated•6 years ago
|
Comment 1•5 years ago
|
||
Hmm, i'm curious what you think Julian. I'm not too familiar with remote debugging.
Comment 2•5 years ago
|
||
(In reply to Jason Laster [:jlast] from comment #1)
Hmm, i'm curious what you think Julian. I'm not too familiar with remote debugging.
I think it is not remote debugging, but rather local addon debugging. But I can help you with the STRs :)
1/ Build the extension
- run
git clone https://github.com/cypressious/second-firefox-extension-kotlin/
cd second-firefox-extension-kotlin
./gradlew runDceKotlinJs
2/ Load the extension
- start Firefox
- open about:debugging
- select "This Firefox" (or This Nightly)
- click on "Load Temporary Add-on..."
- open
second-firefox-extension-kotlin/manifest.json
3/ Enable "Disable popup auto hide"
- open the Browser Toolbox
- turn on "Disable popup auto hide" in the Browser Toolbox hamburger menu
- (you can close the Browser Toolbox now)
4/ Trigger the extension's popup
- open any website with images (eg https://www.mozilla.org/en-US/)
- click on the Beastify extension icon in the toolbar
- this should show the extension's popup with 4 items "Frog, Turtle, Snake, Reset"
- (and thanks to step 3 the popup should still be displayed)
5/ Debug the extension
- go back to about:debugging#/runtime/this-firefox
- in the Temporary Extensions category, click on Inspect next to Beastify
- open the debugger
- check if sourcemapped sources are working
Note that it seems to work a bit better than what the initial report mentioned. I can see *.kt files in the source tree. Some can be opened (eg moz-extension://8d66093c-c373-954f-91d5-1fcdde232a5a/popup/src/main/kotlin/popup.kt) some can't (moz-extension://8d66093c-c373-954f-91d5-1fcdde232a5a/src/main/kotlin/extensionTypes/extensionTypes.kt). When they fail to open, the logged error is:
Error while fetching an original source: TypeError: NetworkError when attempting to fetch resource.
Source URL: moz-extension://8d66093c-c373-954f-91d5-1fcdde232a5a/src/main/kotlin/extensionTypes/extensionTypes.kt
But looking at my sources locally I can't find any extensionTypes.kt file, so maybe the sourcemap is faulty?
Comment 3•5 years ago
|
||
I just tested the extension recently and sourcemaps seem to work for me. I know this is a very old bug and sorry for not having a look earlier, but could you have a look and confirm? Thanks!
Comment 4•5 years ago
|
||
Happy to re-open if you see an issue.
Description
•