Closed Bug 1347018 Opened 7 years ago Closed 4 years ago

Web Console sometimes doesn't link to debugger

Categories

(DevTools :: Console, defect, P3)

51 Branch
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: steely.wing, Unassigned)

Details

Attachments

(1 file)

Attached image Untitled.png
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:51.0) Gecko/20100101 Firefox/51.0
Build ID: 20170125094131

Steps to reproduce:

- Open a test.html

```
<html>
<body>
<script>
console.log('test');
</script>
</body>
</html>
```

- Open web console, click the log message source link
- If the link go to debugger, re-open web console (press F12 twice)
- Click the source link again, it will link to view-source
- If I refresh the page, click the link again, it will link to debugger

In some web page, it always link to view-source even I refresh.


Actual results:

Source link link to view-source


Expected results:

Source link should link to debugger
Component: Untriaged → Developer Tools: Console
OS: Unspecified → All
Hardware: Unspecified → All
Status: UNCONFIRMED → NEW
Has STR: --- → yes
Ever confirmed: true
Priority: -- → P3
Product: Firefox → DevTools

Simpler STR:

  1. Go to data:text/html,<meta charset=utf8><script>console.log("hello")</script>
  2. Open the console
  3. Close devtools
  4. Re-open the console
  5. Click on the location of the hello log

-> Opens view:source


For some reason I can't understand, this doesn't reproduce every time 🤔
What I observe when this happens is that frame.sourceId is null when calling this.toolbox.viewSourceInDebugger.

cc Brian as he did some work on this area lately.

Flags: needinfo?(bhackett1024)

The problem here is that the source which called console.log() can be garbage collected before the debugger is opened, which prevents the server from being able to create a SourceActor which can be opened in the debugger. This is a similar issue to bug 1503422, though in this case the server can more easily detect that the relevant source has been GC'ed, because there is an ID on the console message information which does not correspond with any source which the debugger can find.

Flags: needinfo?(bhackett1024)

I think this should be fixed with https://bugzilla.mozilla.org/show_bug.cgi?id=1572596

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: