Closed Bug 969912 Opened 10 years ago Closed 10 years ago

DevTools should display script element content (in Inspector or Debugger or both)

Categories

(DevTools :: Debugger, defect)

30 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 901930

People

(Reporter: codacodercodacoder, Unassigned)

Details

(Keywords: testcase)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20140127194636

Steps to reproduce:

Create stuff.js file with ...

stuff = {
  "prop" : "value"
  ...
};

and include it with...

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




Actual results:

It is not possible to view the content of this script in either the Inspector's HTML pane or the sources list in the Debugger.


Expected results:

The script should be available in the debugger if only for review purposes. I suspect since it's "in memory" and contains no callable code the script has been GCd?
Version: 27 Branch → 30 Branch
If you've not opened the debugger pane before, no scripts are listed. If you reload the page, I see the script show up. I'm not sure if this is by design.
Component: Untriaged → Developer Tools: Debugger
That sounds like bug 901930.

Here, debugger does not show any content for any script which contains only JSON.  Inspector shows the script elements, and the page behaves correctly proving the JSON scripts are loaded and valid.
Minimal testcase: http://gijsk.com/mozilla/testcases/empty-script/

My STR:

1. Open page.
2. Open inspector with cmd+option+i (I'm on Mac; I'm 99.99% sure that won't make a difference - the Windows shortcut is ctrl-shift-i)
3. Switch to debugger -> no script visible
4. hit refresh -> script visible


Are you seeing something else?
Flags: needinfo?(russgthomas)
Keywords: testcase
Yes and no... firstly, my STR is a simplified version of the real situation.  You're right - following your steps I can get the file to appear, though not consistently.  Worse, that makes for a terrible workflow when "deep in debugging mode" in my head.

Whether it's cache behavior or GC or whatever, all html, all css and certainly all scripts should be available for the lifetime of the page/session. (IMO)
Flags: needinfo?(russgthomas)
This is the exact same issue as bug 901930. Scripts that were GC'd before the debugger was open will not appear without a reload.
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.