Closed
Bug 1179876
Opened 10 years ago
Closed 9 years ago
Add links to an "MDN error reference" from console errors
Categories
(DevTools :: Console, defect)
DevTools
Console
Tracking
(firefox49 fixed, relnote-firefox 49+)
RESOLVED
FIXED
Firefox 49
People
(Reporter: fs, Assigned: fs)
References
(Depends on 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file, 2 obsolete files)
3.56 KB,
patch
|
mrrrgn
:
review+
|
Details | Diff | Splinter Review |
The web console emits thousands of error messages to web developers everyday. While seasoned web developers understand what is going on, especially beginners need help to understand them. Often the message gets copied, put into google, and answered on Stackoverflow.
What we could do is adding a [Learn More] link to error messages (like we already do for warnings, see CORS), so that we offer developers a direct way to get to know more about what just happened.
This could also be an icon to reduce the text noise (say a question mark in a circle).
More information is available in this etherpad: https://etherpad.mozilla.org/webconsole-mdn-error-msg and the discussion is happening here: https://groups.google.com/forum/#!topic/mozilla.dev.developer-tools/zUiTSyjIvOs
This bug is about the devtools implementation in the console.
The current [Learn More] function lives here: https://dxr.mozilla.org/mozilla-central/source/browser/devtools/webconsole/webconsole.js#1693
A link to the error docs could look like his:
https://developer.mozilla.org/docs/Web/JavaScript/Errors/JSMSG_BAD_RADIX
where "JSMSG_BAD_RADIX" is an "errorNumber" from https://dxr.mozilla.org/mozilla-central/source/js/src/js.msg
I will file a depended bug to get "errorNumber" added to nsIScriptError.
Updated•9 years ago
|
Keywords: dev-doc-needed
Comment 2•9 years ago
|
||
Release Note Request (optional, but appreciated)
[Why is this notable]: Great new features for developers - http://imgur.com/EOztwbI
[Suggested wording]: Console errors provide links to an "MDN error reference"
[Links (documentation, blog post, etc)]: having a doc would help
relnote-firefox:
--- → ?
Assignee | ||
Comment 3•9 years ago
|
||
Attachment #8758019 -
Flags: review?(winter2718)
Comment 4•9 years ago
|
||
Comment on attachment 8758019 [details] [diff] [review]
Add more doc links to console errors
Review of attachment 8758019 [details] [diff] [review]:
-----------------------------------------------------------------
So much \m/! :)
Attachment #8758019 -
Flags: review?(winter2718) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Okay, some more docs written. Let's land these :)
Attachment #8758019 -
Attachment is obsolete: true
Attachment #8758916 -
Flags: review+
Assignee | ||
Comment 6•9 years ago
|
||
Morgan, I updated the patch to include some more docs. Can you land this? I have no clue how to do that properly and might not have required permissions etc.
Flags: needinfo?(winter2718)
Comment 7•9 years ago
|
||
(In reply to Florian Scholz [:fscholz] (MDN) from comment #6)
> Morgan, I updated the patch to include some more docs. Can you land this? I
> have no clue how to do that properly and might not have required permissions
> etc.
No problem, will land the patch tonight.
Flags: needinfo?(winter2718)
Pushed by mphillips@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/8203279f09e3
Permafails browser_webconsole_bug_653531_highlighter_console_helper.js; r=backout
Comment 9•9 years ago
|
||
Comment on attachment 8758916 [details] [diff] [review]
errordocs.patch
Review of attachment 8758916 [details] [diff] [review]:
-----------------------------------------------------------------
I did a poor job reviewing this my first pass through. There is a bug here that needs fixin' also the bug number in the commit message is wrong.
::: devtools/server/actors/errordocs.js
@@ +51,3 @@
> };
>
> +exports.GetURL = (errorName) => baseURL + ErrorDocs[errorName];
This should be something like:
exports.GetURL = (errorName) => {
let doc = ErrorDocs[errorName];
if (doc)
return baseURL + doc;
return undefined;
}
Otherwise every possible error will return a learn more link to baseURL/undefined.
Attachment #8758916 -
Flags: review+
Comment 10•9 years ago
|
||
s/possible error/error that doesn't have a doc url/
Assignee | ||
Comment 11•9 years ago
|
||
Attachment #8758916 -
Attachment is obsolete: true
Attachment #8759587 -
Flags: review?(winter2718)
Comment 12•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
Comment 13•9 years ago
|
||
bugherder |
Assignee | ||
Comment 14•9 years ago
|
||
Yup, this was backed out. Revised patch is attached. Sorry for the trouble.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•9 years ago
|
Attachment #8759587 -
Flags: review?(winter2718) → review+
Comment 15•9 years ago
|
||
Landing after this try run looks green enough: https://treeherder.mozilla.org/#/jobs?repo=try&revision=67615de240c4
Comment 16•9 years ago
|
||
Relnote 49+ with the suggested wording "Console errors provide links to an "MDN error reference"
Comment 17•9 years ago
|
||
(In reply to Marcia Knous [:marcia - use ni] from comment #16)
> Relnote 49+ with the suggested wording "Console errors provide links to an
> "MDN error reference"
I assume this will eventually be in https://developer.mozilla.org/en-US/Firefox/Releases/49#Changes_for_Web_developers, so when it lands there I can just point to it in the release notes if necessary.
Comment 18•9 years ago
|
||
Pushed by mphillips@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b9e7c2e445f4
Add more doc links to console errors; r=mrrrgn
Comment 19•9 years ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Comment 20•9 years ago
|
||
Florian, is https://developer.mozilla.org/en-US/Firefox/Releases/49#Developer_Tools enough, or should it also be mentioned somewhere else?
Sebastian
Assignee: nobody → fscholz
Flags: needinfo?(fscholz)
Comment 21•9 years ago
|
||
Well, I've also added a note here now:
https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Console_messages#JS
Sebastian
Updated•9 years ago
|
Assignee | ||
Comment 22•9 years ago
|
||
Thanks Sebastian! I've updated the docs with a link to the Hacks blog post and added the gif showing the feature to the console page.
(In reply to Marcia Knous [:marcia - use ni] from comment #17)
> (In reply to Marcia Knous [:marcia - use ni] from comment #16)
> > Relnote 49+ with the suggested wording "Console errors provide links to an
> > "MDN error reference"
>
> I assume this will eventually be in
> https://developer.mozilla.org/en-US/Firefox/Releases/
> 49#Changes_for_Web_developers, so when it lands there I can just point to it
> in the release notes if necessary.
https://hacks.mozilla.org/2016/06/helping-web-developers-with-javascript-errors/ has the best summary of this feature. I would link to this blog post from the release notes.
Flags: needinfo?(fscholz)
Keywords: dev-doc-needed → dev-doc-complete
Comment 23•9 years ago
|
||
49 release notes updated with a link to the blog post, thanks!
Comment 24•8 years ago
|
||
This bug as about to implement "links to an 'MDN error reference' from console errors" as mentioned as #comment0 . I have seen the features being implemented with Beta 49.0 on Windows 7, 64 Bit !
This bug's fix is verified with latest Beta 49.0
Build ID 20160912134115
User Agent Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:49.0) Gecko/20100101 Firefox/49.0
[bugday-20160914]
Updated•7 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•