Open Bug 1407066 Opened 7 years ago Updated 2 years ago

Console's SyntaxError [Learn More] is generic and unhelpful

Categories

(DevTools :: Console, defect, P3)

58 Branch
defect

Tracking

(Not tracked)

People

(Reporter: pornel, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:58.0) Gecko/20100101 Firefox/58.0
Build ID: 20171002223859

Steps to reproduce:

When my code has a syntax error Firefox shows an error like:

> SyntaxError: expected expression, got ',' [Learn More]


Actual results:

Clicking Learn More opens an external URL with a generic description of syntax errors, which has nothing to do with my particular error.


Expected results:

It should show my source code and highlight the exact line/token that contains the error.

I know clicking the line number on the far right side does it, but that is less convenient to click, and I expect the first most prominent link to be the useful one. 

I keep clicking it without thinking and I'm annoyed by getting irrelevant page yet again.
Component: Untriaged → Developer Tools: Console
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P3
Summary: Consle's SyntaxError Learn More is generic and unhelpful → Consle's SyntaxError [Learn More] is generic and unhelpful
Product: Firefox → DevTools
Summary: Consle's SyntaxError [Learn More] is generic and unhelpful → Console's SyntaxError [Learn More] is generic and unhelpful

On Stack Overflow, a question that gets asked daily is of the form “Why does my JS throw TypeError: Cannot read property […] of null?” and the cause is usually that the DOM hasn’t loaded yet, so the question is closed as a duplicate of Why does jQuery or a DOM method such as getElementById not find the element?. I randomly found this bug and would like to ask: would a “Learn more” link that is aware of the context and would explain things like these be in the scope of this bug?

I’d love to see the Firefox console explaining common errors. However, I’m not sure if it’s even possible or feasible to implement this in an efficient manner. While writing, it does remind me of the (failed?) experiment enabled by the javascript.options.strict pref…

Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.