[Debugger] When Javascript is disabled, debugger panel is empty

NEW
Unassigned

Status

()

Firefox
Developer Tools: Debugger
2 years ago
2 years ago

People

(Reporter: karlcow, Unassigned)

Tracking

44 Branch
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

2 years ago
Steps to Reproduce:

1. Open developer tools:
2. Select Disable JavaScript 
3. Go to https://www.mozilla.org/en-US/
4. Look at the debugger panels

Expected: see the scripts

Actual: empty panel

When I disable JavaScript I'm expected to have them not being executed in the page. They still exist in the code and seeing them would be useful.

How did I encounter this behaviour?

I was trying to debug a Web site which does UA sniffing on the client side with JavaScript and redirects to a new context. Losing my previous context. 
The goal was to have the initial page, inspect the script to find the user agent sniffing code and understands it. 

Tested with 46.0a1 (2015-12-21)
Opera Dragonfly had a general "Pause" feature that would make sure the debugger stopped at every script encountered. One of the corner cases this was very useful for was those JS redirects. Might be an alternate way to handle this use case.
The JS debugger by design only sees the JS that runs on the page. Changing this would mean fundamentally re-architecting the debugger. Although I do understand your use case, I'm very tempted to close this bug because it is very unlikely to ever be properly fixed.

(In reply to Hallvord R. M. Steen [:hallvors] from comment #1)
> Opera Dragonfly had a general "Pause" feature that would make sure the
> debugger stopped at every script encountered. One of the corner cases this
> was very useful for was those JS redirects. Might be an alternate way to
> handle this use case.

That would be bug 917963.
Karl: IMO it would be somewhat surprising to see code presented in the debugger that is not and can not run and affect the page. What if you tried to set a breakpoint and interact with that code..? The debugger would need to invent a "disabled" mode and indicate a "disabled" source in its UI? Not sure what other web browser developer tools do, but I think finding a good UI here seems hard. Would you be happy to push for a fix to bug 917963 instead?
You need to log in before you can comment on or make changes to this bug.