Closed
Bug 616742
Opened 14 years ago
Closed 14 years ago
Implement console.debug() (was: Navigation broken on Citytv website)
Categories
(DevTools :: General, defect)
Tracking
(blocking2.0 -)
VERIFIED
FIXED
Firefox 5
Tracking | Status | |
---|---|---|
blocking2.0 | --- | - |
People
(Reporter: fehe, Assigned: rcampbell)
References
()
Details
(Keywords: dev-doc-complete, regression, Whiteboard: [console-3][has-review])
Attachments
(1 file)
(deleted),
patch
|
ddahl
:
review+
sicking
:
review+
|
Details | Diff | Splinter Review |
On the citytv.com/vancouver website, there 6 rectangular blocks representing 6 different shows. Normally, hovering them changes the banner to one corresponding to the block hovered (along with an arrow pointing to the banner). The block should also be clickable.
Since the Nov 17 nightly, this no longer works. The site works properly in both Google Chrome and IE 8.
With the Nov 17 nightly, the following also appears in Error Console:
Error: Permission denied to access property 'debug'
Source File: http://tv.citytv.com/scripts/com.rogers.TVSchedule.CityScheduleWidget.js
Line: 194
With recent nightlies, the Error Console message is instead:
Error: console.debug is undefined
Source File: http://tv.citytv.com/scripts/com.rogers.TVSchedule.CityScheduleWidget.js
Line: 194
Regression pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=a42e9b001bc8&tochange=ad227939db82
I therefore suspect this to be a fallout of bug 587734.
Updated•14 years ago
|
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
bug 614350 did not fix this.
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Comment 3•14 years ago
|
||
You're still getting the same error? I don't see how that could possibly be happening...
Yes. Comment 0 still reproducible -- even with the Dec 11 nightly.
Assignee | ||
Comment 5•14 years ago
|
||
confirmed ([expletive deleted]!).
The line in question is doing an apply like so:
/**
* Firebug based console logging
*/
com.rogers.TVSchedule.CityScheduleWidget.prototype.log = function()
{
if (this.config.debug && window.console)
console.debug.apply(console, arguments);
};
I can reproduce this in the JSTerm of our console by doing something like:
console.debug.apply(console, ["hi"])
and get
TypeError: console.debug is undefined
I wonder if this is a bug in __noSuchMethod__ ?
Comment 6•14 years ago
|
||
console.debug isn't being called in that case, so not a bug in __noSuchMethod__. We can't really fix that kind of bustage without actually replicating firebug's console entirely, which I don't think we want to do. Tech Evangelism might be the best way forward here... hopefully this isn't reflective of a widespread pattern.
Assignee | ||
Comment 7•14 years ago
|
||
ah, ok. Read a little more about __noSuchMethod__ and that seems to be the case.
Looks like we're either back to implementing the known Console API methods individually (as stubs or fully) to make problems like this one go away.
Comment 8•14 years ago
|
||
Not going to hold the release on websites leaving debugging code laying around, blocking-.
blocking2.0: ? → -
Assignee | ||
Comment 9•14 years ago
|
||
I think that's fair.
I may have a solution with a Proxy-based catch-all, but need a bit more experimentation. Will post a patch when ready.
Comment 10•14 years ago
|
||
I'm not convinced this is a devtools bug.
Updated•14 years ago
|
Whiteboard: [console-3]
Updated•14 years ago
|
Keywords: regression
Reporter | ||
Comment 11•14 years ago
|
||
(In reply to comment #10)
> I'm not convinced this is a devtools bug.
Why not? If I make a local copy of the affected content and edit http://tv.citytv.com/scripts/com.rogers.TVSchedule.CityScheduleWidget.js, changing the following line:
debug: true
to:
debug: false
then everything works.
Every other major browser renders that page without issue. Only Firefox 4 has problems.
Keywords: regression
Assignee | ||
Comment 12•14 years ago
|
||
(In reply to comment #11)
> (In reply to comment #10)
> > I'm not convinced this is a devtools bug.
>
> Why not? If I make a local copy of the affected content and edit
> http://tv.citytv.com/scripts/com.rogers.TVSchedule.CityScheduleWidget.js,
> changing the following line:
> debug: true
>
> to:
> debug: false
>
> then everything works.
>
> Every other major browser renders that page without issue. Only Firefox 4 has
> problems.
And you think it's OK for CityTV to ship a production version of their website with debugging turned on?
If you click on "shows" the widget works fine there. Looks like they forgot to disable debugging on their main page. They're also not detecting that there's a console.debug object for them to apply with. In short, there's a lot broken on that webpage and they should fix it.
All that said, I'm going to convert this bug to Implement console.debug and that should make the bug go away when it lands.
Blocks: 644596
Summary: Navigation broken on Citytv website → Implement console.debug() (was: Navigation broken on Citytv website)
Assignee | ||
Comment 13•14 years ago
|
||
most basic debug support imaginable. The function itself is pretty weakly defined, basically behaves as log().
"console.debug(object[, object, ...])
Writes a message to the console, including a hyperlink to the line where it was called. "
from http://getfirebug.com/wiki/index.php/Console_API
Comment 14•14 years ago
|
||
(In reply to comment #13)
> Writes a message to the console, including a hyperlink to the line where it was
> called. "
Are you adding the hyperlink bit in a followup bug? Also , 2 more things that would make this awesome would be another color for debug messages and a filter menu button - all of which should maybe come in a fx 6 patch?
Comment 15•14 years ago
|
||
Comment on attachment 522467 [details] [diff] [review]
[checked-in] console.debug
If we are just mirroring log, this is fine. this should cut down the bug reports as I imagine debug() is the next heavily used api after what we have so far.
Attachment #522467 -
Flags: review?(ddahl) → review+
Assignee | ||
Comment 16•14 years ago
|
||
(In reply to comment #14)
> (In reply to comment #13)
>
> > Writes a message to the console, including a hyperlink to the line where it was
> > called. "
>
> Are you adding the hyperlink bit in a followup bug? Also , 2 more things that
> would make this awesome would be another color for debug messages and a filter
> menu button - all of which should maybe come in a fx 6 patch?
added bug 646025 to handle the file location.
Not sure we need another color to distinguish debug from log. They appear to be synonymous with each other. I will add a filter option bug as well.
Thanks for the review!
Assignee | ||
Comment 17•14 years ago
|
||
Comment on attachment 522467 [details] [diff] [review]
[checked-in] console.debug
review request for consoleAPI bits for sicking.
Attachment #522467 -
Flags: review?(jonas)
Assignee | ||
Comment 18•14 years ago
|
||
added bug 646028 to add the filter button.
Assignee | ||
Updated•14 years ago
|
Attachment #522467 -
Flags: review?(gal)
Assignee | ||
Comment 19•14 years ago
|
||
Andreas, was just looking at bug 634156 and thought I'd try to sneak a quick review through before you made that change. We'd like to add "debug" to this list of functions.
Comment on attachment 522467 [details] [diff] [review]
[checked-in] console.debug
>diff --git a/dom/base/ConsoleAPI.js b/dom/base/ConsoleAPI.js
>+ debug: function CA_debug() {
>+ self.notifyObservers(id, "log", arguments);
>+ },
If you're passing "log" here...
>diff --git a/toolkit/components/console/hudservice/HUDService.jsm b/toolkit/components/console/hudservice/HUDService.jsm
>@@ -139,16 +139,17 @@ const SEVERITY_INFO = 2;
> const SEVERITY_LOG = 3;
>
> // A mapping from the console API log event levels to the Web Console
> // severities.
> const LEVELS = {
> error: SEVERITY_ERROR,
> warn: SEVERITY_WARNING,
> info: SEVERITY_INFO,
>+ debug: SEVERITY_LOG,
> log: SEVERITY_LOG,
> };
...then you don't need to add "debug" here, right? So either use "debug" above, or don't add "debug" to LEVELS.
r=me with that fixed.
Attachment #522467 -
Flags: review?(jonas) → review+
Assignee | ||
Comment 21•14 years ago
|
||
true enough. Thanks for the review!
Assignee | ||
Comment 22•14 years ago
|
||
Comment on attachment 522467 [details] [diff] [review]
[checked-in] console.debug
checked into devtools:
http://hg.mozilla.org/projects/devtools/rev/3bbc2fd96c48
Attachment #522467 -
Attachment description: console.debug → [in-devtools] console.debug
Attachment #522467 -
Flags: review?(gal)
Assignee | ||
Updated•14 years ago
|
Whiteboard: [console-3] → [console-3][has-review][in-devtools][merge-m-c]
Assignee | ||
Comment 23•14 years ago
|
||
checked in a followup fix for the dom level test.
http://hg.mozilla.org/projects/devtools/rev/bc1ba93ee006
Comment 24•14 years ago
|
||
Location of the call is easy to track down from Components.stack. See the code from bug 585956.
Assignee | ||
Comment 25•14 years ago
|
||
yep. Followup... bug 646025.
Assignee | ||
Updated•14 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 14 years ago → 14 years ago
Resolution: --- → FIXED
Whiteboard: [console-3][has-review][in-devtools][merge-m-c] → [console-3][has-review]
Assignee | ||
Comment 26•14 years ago
|
||
Comment on attachment 522467 [details] [diff] [review]
[checked-in] console.debug
http://hg.mozilla.org/mozilla-central/rev/3bbc2fd96c48
Attachment #522467 -
Attachment description: [in-devtools] console.debug → [checked-in] console.debug
Assignee | ||
Comment 27•14 years ago
|
||
also, http://hg.mozilla.org/mozilla-central/rev/bc1ba93ee006 for test fix
Reporter | ||
Comment 28•14 years ago
|
||
Thank you for providing a resolution for this.
Verified with http://hg.mozilla.org/mozilla-central/rev/a174b86200d6
Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110412 Firefox/4.2a1pre
Status: RESOLVED → VERIFIED
Updated•14 years ago
|
Target Milestone: --- → Firefox 5
Assignee | ||
Comment 29•14 years ago
|
||
(In reply to comment #28)
> Thank you for providing a resolution for this.
>
> Verified with http://hg.mozilla.org/mozilla-central/rev/a174b86200d6
>
> Mozilla/5.0 (Windows NT 5.1; rv:2.2a1pre) Gecko/20110412 Firefox/4.2a1pre
You're welcome! Thanks for sticking with it. :)
Comment 30•14 years ago
|
||
doc folks: this page should mention console.debug (which is a synonym for console.log):
https://developer.mozilla.org/en/Using_the_Web_Console#The_console_object
and it may make sense to mention the addition here as well:
https://developer.mozilla.org/en/Firefox_5_for_developers#DOM
Keywords: dev-doc-needed
Comment 31•14 years ago
|
||
The documentation referenced in comment #30 has been updated.
Keywords: dev-doc-needed → dev-doc-complete
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•