Closed Bug 872065 Opened 11 years ago Closed 11 years ago

Console showing chrome code warnings/errors is very surprising and confusing

Categories

(DevTools :: Console, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 860312

People

(Reporter: vporof, Unassigned)

Details

Attachments

(2 files)

Attached image screenshot
STR:

1. Open http://htmlpad.org/debugger/
2. Open debugger
3. Open console
4. Click "Click me" in the page
5. Evaluate "pAsProto"

[19:11:33.219] Ignoring get or set of property that has [LenientThis] because the "this" object is incorrect. @ chrome://global/content/devtools/dbg-script-actors.js:1568

My first reaction as a user would be "wtf?" :)
Attached image screenshot 2
Also: 

[19:14:42.590] Use of inputEncoding is deprecated. @ chrome://global/content/devtools/dbg-script-actors.js:1568

..if you evaluate document in that same frame.
We have another bug on file about this that I can't find atm, and the problem is that I don't know of any way to tell the engine not to log those errors, or to tell them apart in the console observer.
There is bug 802543 for just the opposite, if anyone is interested.
(In reply to Panos Astithas [:past] from comment #2)
> We have another bug on file about this that I can't find atm, and the
> problem is that I don't know of any way to tell the engine not to log those
> errors, or to tell them apart in the console observer.

This issue Victor reported seems to be related to bz's explanation of LenientThis, see bug 871510. If we fix that, we also probably fix this issue.
We'll fix this specific LenientThis warning, but I don't know of any way to have the web console filter out nsIConsoleService messages caused by chrome code (that should only be displayed in the browser console).
(In reply to Panos Astithas [:past] from comment #5)
> We'll fix this specific LenientThis warning, but I don't know of any way to
> have the web console filter out nsIConsoleService messages caused by chrome
> code (that should only be displayed in the browser console).

The LenientThis warning is caused by the debugger while it executes code in the web page context. The web console can't tell the difference because the nsIScriptError has the web page window ID. Do we have a warning/error filename location we can filter out? Afaik we do, but in some cases we want those warnings/errors to show (eg. when the user evaluates some code in vview or in jsterm).
The symptoms mentioned so far have been cured. Should we resolve this bug or add new STR since the underlying issue is still present?
(In reply to Panos Astithas [:past] from comment #7)
> The symptoms mentioned so far have been cured. Should we resolve this bug or
> add new STR since the underlying issue is still present?

New STR should make sense.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: