Open Bug 1574758 Opened 6 years ago Updated 1 year ago

Disabling source maps prevents debugging webextensions

Categories

(WebExtensions :: Developer Tools, defect, P3)

68 Branch
defect

Tracking

(firefox69 affected, firefox70 affected, firefox71 affected)

Tracking Status
firefox69 --- affected
firefox70 --- affected
firefox71 --- affected

People

(Reporter: code, Unassigned)

References

(Depends on 1 open bug)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

  1. Build any webextension with source map support

  2. Load it in firefox with about:debugging, open the page console, notice that the extension's source code is available for debugging

  3. Go to the devtool's settings, untick the Enable Source Maps checkbox.

Actual results:

In the debugger tab, the compiled source code of the webextension is not available anymore.

Expected results:

The compiled source code of the webextension should have been available for me to interact with.

Note: re-enabling source maps doesn't bring back the extension's source code in the debugger.

Hi glacambre, can you please add a webextension that you are using to try to reproduce this issue?
Also, do you have the same issue on the Nightly version? Please download Firefox Nightly from here: https://nightly.mozilla.org/ and retest the problem.
If you have add-ons on your profile it will worth to try to test in safe mode and see if the issue is still there, to do that this might help you:
https://support.mozilla.org/en-US/kb/troubleshoot-firefox-issues-using-safe-mode

Flags: needinfo?(code)
Attached file firenvim-0.1.7.zip

On Firefox nightly, part of the bug has been fixed: disabling source maps does make the original source disappear but does not make the compiled javascript appear. However, re-enabling source maps does make the original source code appear again.

Here's an extension I can reproduce this issue with.

Flags: needinfo?(code)
Component: Untriaged → Developer Tools
Product: Firefox → WebExtensions
Version: 68 Branch → Firefox 68

Reproduced this issue on Ubuntu 18.04.3 LTS FF Release 68.0 (20190705220548), 69.0 (20190827005903) and 70.0b6 (20190912160217) and on Windows 10 with 64-bit with Release 69.0 (20190827005903), Beta 70.0b6 (20190912160217) and Nightly 71.0a1 (20190912215412).
To note devtools must be closed after disabling the "Enable Source Maps" option and then the extension should be debugged/inspected again in for the source code not to show.
As mentioned in comment 2, by enabling "Enable Source Maps" option (and closing and opening devtools again) the original source code appears again.
Attached "enable source maps bug" GIF.

Status: UNCONFIRMED → NEW
Ever confirmed: true

The priority flag is not set for this bug.
:jimm, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jmathies)

Set as P3 for now (because the source maps settings seems to still work as expected, even if it seems that it is not currently always refreshing the sources without closing and reopening the toolbox after changing the "Enable Source Maps" setting).

Flags: needinfo?(jmathies)
Priority: -- → P3

Hi Jason,
when targeting a content webpage, which is the expected behavior of the debugger panel when the "Enable Source Maps" devtools setting is toggled while the toolbox is open and the debugger panel already loaded?

Flags: needinfo?(jlaster)

the checkbox will affect subsequent events/actions. I recommend checking it and then refreshing.

Flags: needinfo?(jlaster)
Version: Firefox 68 → 68 Branch
Severity: normal → S3

This isn't specific to extensions.

We have bug 1853938, with a work in progress patch that I haven't had time to finish to handle toggling source map on/off while devtools are opened.

Depends on: 1853938
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: