Closed Bug 562356 Opened 14 years ago Closed 6 years ago

Report error locations on dynamically created script tags with inline code

Categories

(DevTools :: Console, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: hansschmucker, Unassigned)

References

()

Details

(Whiteboard: [Web-Console-Testday] [console-2])

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100427 ( LIKE Firefox/3.6.3 )
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.3a5pre) Gecko/20100427 ( LIKE Firefox/3.6.3 )

When a script that has been inserted dynamically into the DOM (by creating a script/textNode pair, for example while using a dynamic preprocessor) tries to report an error, the location of the error is unknown and it is difficult to find the actual position.

It would be immensely helpful if Firefox could instead point to the content of the script tag. One example could be creating a data url containing the textContent of the node and reporting the location of the data url as location error.

Reproducible: Always

Steps to Reproduce:
1. Open the given data url
2. Watch the error console for "np is not defined"
Actual Results:  
No location is given for the error. Clicking the error just takes you to the hosting document.

Expected Results:  
Error location should be given as line inside the script node's text content. Clicking should take you to a document containing the content of the node's text.
Summary: Report error locations on dynamically created script tags → Report error locations on dynamically created script tags with inline code
Status: UNCONFIRMED → NEW
Ever confirmed: true
Whiteboard: [Web-Console-Testday]
I'm not certain it will make the difference but there is a lot of additional logging work going on in bug 606498 that might possibly make the difference here. Otherwise, I agree that this would be a nice improvement.
Whiteboard: [Web-Console-Testday] → [Web-Console-Testday] [console-2]
Component: Developer Tools → Developer Tools: Console
Priority: -- → P3
So this is probably the main reason the debugger gets into confusing states for me on certain websites.. At least symptoms match what I see with this TC. I'd love to get this fixed!
Product: Firefox → DevTools
STR from Comment 0 does show a location, and clicking on it takes you to the debugger, so I'm assuming the issue is no more.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.