Open
Bug 905978
Opened 11 years ago
Updated 2 years ago
Do not show in console warnings and errors for black boxed scripts
Categories
(DevTools :: Console, enhancement, P3)
DevTools
Console
Tracking
(Not tracked)
NEW
People
(Reporter: striptm, Unassigned)
References
(Blocks 3 open bugs)
Details
(Whiteboard: [console-papercuts][polish-backlog])
Is desirable not show warnings and errors in the console for javascripts sources are in black box.
Many libraries for crossbrowsing show countless of warnings that do not help debugging work.
Comment 1•11 years ago
|
||
This is an interesting idea, but do note that libraries can also have errors that cause the web apps to break. Hiding errors would cause confusion. If we do this, we should be extra-careful about how we can avoid user confusion.
Comment 2•11 years ago
|
||
Maybe we can add a fourth menu item in the JS menu to show errors from blackboxed sources too, which will be disabled by default ?
Reporter | ||
Comment 3•11 years ago
|
||
Or as a preference in the Options panel? like
[ ] Hide errors & warnings for JavaScripts black boxed.
Comment 4•11 years ago
|
||
Blackboxing depends on running code in debug mode, which is something the web console doesn't force upon pages. At a minimum, implementing this would require a SpiderMonkey hook to notify when en error or warning is about to be logged.
Updated•11 years ago
|
Priority: -- → P3
Comment 6•10 years ago
|
||
FWIW this was requested for Firebug a long time ago.[1]
I'd argue that blackboxing log messages should not be restricted to JavaScript files. Also errors within specific CSS files may be undesired. Should that be part of this issue?
Also, people may want to blackbox them directly from within the Console panel once this feature is implemented. So I created bug 1102797.
Sebastian
[1] https://code.google.com/p/fbug/issues/detail?id=2955
Updated•10 years ago
|
Hardware: x86_64 → All
Updated•10 years ago
|
Blocks: dbg-blackbox
Comment 7•10 years ago
|
||
In particular it would be helpful to be able to configure which types of warnings are excluded from black-boxed code. It would be helpful to be able to choose not to show Deprecated / Obsolete warnings, for instance the following error in an old jQuery:
KeyboardEvent.key value "Down" is obsolete and will be renamed to "ArrowDown". For more help https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent.key
Is something which I do not need to know from a black-boxed source, however other warnings may be desirable.
Updated•10 years ago
|
Whiteboard: [console-papercuts]
Comment 8•10 years ago
|
||
I agree with Mihai in Comment 1, and I don't think it's best to disable logs from blackboxed sources. Surely if there are errors or warnings causing a problem with your application you'd want to see what is going on and not have it fail silently.
In fact, there is a use case for blackboxing a file with a helper function where you wrap console.logs to be able to see the original call location - see https://gist.github.com/paulirish/c307a5a585ddbcc17242. Unfortunately we aren't yet using the correct source links in the console even after blackboxing log-helper.js at http://plnkr.co/edit/3wg4u9HUGXfFH0U7MR7j?p=preview.
Updated•10 years ago
|
Whiteboard: [console-papercuts] → [console-papercuts][devedition-40]
Updated•9 years ago
|
Whiteboard: [console-papercuts][devedition-40] → [console-papercuts][polish-backlog]
Updated•9 years ago
|
Blocks: console-output
Summary: Do not show in console warnings and errors for js black boxed → Do not show in console warnings and errors for black boxed scripts
Comment 9•7 years ago
|
||
(In reply to Brian Grinstead [:bgrins] from comment #8)
> I agree with Mihai in Comment 1, and I don't think it's best to disable logs
> from blackboxed sources. Surely if there are errors or warnings causing a
> problem with your application you'd want to see what is going on and not
> have it fail silently.
For that case, there may be a note shown at the top of the panel telling the user that errors happened in blackboxed sources and maybe give them the opportunity right there to un-blackbox them.
Sebastian
Reporter | ||
Comment 10•7 years ago
|
||
The idea of Sebastian seems very good, there could be a 'blackbox errors counter' that can be used to show / hide them.
Updated•7 years ago
|
Severity: normal → enhancement
Comment 11•7 years ago
|
||
Maybe this can be added as a negative expression to filter console log by source (that currently it only filter messages that exist) like a simple search text and if found don't show it.
For example, writing the filter expression "!source:jquery.min.js" you filter out messages from the jquery source file. Or the other way with "source:myweblogic.js" you only filter messages from myweblogic.js.
Comment 12•7 years ago
|
||
(In reply to PhoneixSegovia from comment #11)
> Maybe this can be added as a negative expression to filter console log by
> source
Good idea, though that rather fits to bug 1307883. This issue here is really about filtering out messages coming from scripts that are black boxed within the debugger.
Sebastian
Comment 14•7 years ago
|
||
(In reply to Sebastian Zartner [:sebo] from comment #12)
> (In reply to PhoneixSegovia from comment #11)
> > Maybe this can be added as a negative expression to filter console log by
> > source
>
> Good idea, though that rather fits to bug 1307883.
Having said that, I'm not sure whether that bug covers both, the toggle options and the text filter.
Sebastian
Comment 15•7 years ago
|
||
This is a really nice idea, but there's a lot of UX and UI to figure out :
- How do we show important logs from blackboxed script (e.g. exceptions in Library code)
- How we manage these blackboxed sources, i.e. how to add/remove them
- How to sync with the debugger
I think that custom filters in the text input, even if attractive might not scale well, and aren't discoverable.
I'd rather have a context menu entry on the location (and/or an icon next to it), to silence a file (or just a given call site)
This also could be integrated in a broader UI which would show you all the file which initiated at least one log and be able to focus or silence one (could be a left sidebar, like in the debugger).
Comment 16•7 years ago
|
||
(In reply to Nicolas Chevobbe [:nchevobbe] from comment #15)
> This is a really nice idea, but there's a lot of UX and UI to figure out :
> - How do we show important logs from blackboxed script (e.g. exceptions in
> Library code)
See comment 9.
> - How we manage these blackboxed sources, i.e. how to add/remove them
That's covered in bug 1102797 and partly in comment 9.
> - How to sync with the debugger
Sources that are blackboxed within the Console should also be blackboxed within the Debugger and vice versa.
> This also could be integrated in a broader UI which would show you all the
> file which initiated at least one log and be able to focus or silence one
> (could be a left sidebar, like in the debugger).
Sounds good to me. Should be done in a separate bug, though. Let's keep this simple.
Sebastian
Updated•6 years ago
|
Product: Firefox → DevTools
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•