Closed Bug 1518308 Opened 10 months ago Closed 5 months ago

Module scope objects not displayed properly when paused in debugger

Categories

(DevTools :: Debugger, defect, P2)

defect

Tracking

(firefox68 fixed)

RESOLVED FIXED
Firefox 68
Tracking Status
firefox68 --- fixed

People

(Reporter: jlast, Assigned: bhackett)

References

(Blocks 1 open bug)

Details

(Whiteboard: [debugger-mvp])

Attachments

(3 files)

Expected behavior:

When paused in a breakpoint within a .js file with type="module", it should correctly display the module's scope block on the right sidebar.

Actual behavior:

Instead, only <this> : undefined is displayed in that block.

Screenshots:

text/javascript

<script type="text/javascript" src="main.js"></script>

module

<script type="module" src="main.js"></script>

To reproduce:

  1. Clone https://github.com/notjaril/module-scope-example.git
  2. Open index.html
  3. Case 1 (text/javascript), set a breakpoint at main.js:7. Note the Scopes frame in the right sidebar
  4. Change the script type in index.html from text/javascript to module
  5. Case 2 (module), set a breakpoint at main.js:7. Note the Scopes frame in the right sidebar
Attached image main.png
Attached image main-module.png
Blocks: dbg-stepping
No longer blocks: dbg-stepping
Priority: -- → P2
Blocks: dbg-68
No longer blocks: dbg-68
Assignee: nobody → bhackett1024
Status: NEW → ASSIGNED
Whiteboard: [debugger-mvp]

Exported and closed over variables actually show up OK in the scopes view. The problem is that unaliased locals are supposed to be exposed to the debugger (like they are in function/lexical/etc. scopes) but the necessary logic is missing.

See Also: → 1283534
Duplicate of this bug: 1283534
Pushed by bhackett@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/45fb04e542c5
Include unaliased module scope variables in debug environments, r=jonco.
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 68
You need to log in before you can comment on or make changes to this bug.