DebugBar Forums
 
 HOME 
 DOWNLOAD 
 BUY 
 DOC / WIKI 
 FORUM 
 CONTACT 
Stay tuned : rss feed

Forum Home


advanced search

You are not logged in.

Announcement

Forums are now closed as we moved them to google groups. You can use the following Google Groups to discuss about DebugBar and IETester products:

#1 2007-11-12 13:42:14

fabrice
DebugBar Support

console.log feature not working when refreshing page

Hi,

Companion.JS v0.2 introduced the firebug "console.log" feature.
This feature is not working well when the page is refreshed.

I am working on it to correct the problem on the future release.

Offline

 

#2 2007-11-13 18:31:45

georges
New member

Re: console.log feature not working when refreshing page

Great work on CompanionJS. Developing for IE is way easier with your tools.

I have 0.2 installed but console.log isn't working at all, not just when the page is refreshed. My console.log("blabla") line is highlighted in yellow under Source in CompanionJS, so it seems IE is treating it as a JavaScript error. All the JavaScript in the same function after that line is skipped.

Merci encore.

Georges

Offline

 

#3 2007-11-15 13:05:40

fabrice
DebugBar Support

Re: console.log feature not working when refreshing page

Hi Georges,

Some other users reported this problem. I couldn't have a chance to reproduce it on my development environment.

If you are interested in debugging and correct this problem with me feel free to answer here or contact me at contact@debugbar.com .

Thanks.

Offline

 

#4 2008-10-02 15:57:35

mindplay.dk
New member

Re: console.log feature not working when refreshing page

I'm having the same issue.

It started recently, and I can't think of any reason why - I haven't updated anything or installed anything new, haven't changed any settings in IE. I don't use IE as my browser, I use it only for testing and debugging IE-specific quirks.

From the console, I discovered something fishy:

Code:

In [10]=
    console.toString()
Out[10]=
    "function console(msg)   var obj = getElement('console');  if (obj)     var text = getInner(obj);    text = msg + '<br>' + text;    setInner(obj, text);  "

Not sure what goes wrong, but it looks like "console" in the global scope has somehow been overwritten by a function, it's not an object at all??

Offline

 

#5 2008-10-02 16:38:47

fabrice
DebugBar Support

Re: console.log feature not working when refreshing page

Are you using a javascript framework like jquery, dojo, prototype ? Or firebug lite ? Or installed another IE plugin that already handles console.log feature ?

Offline

 

#6 2008-10-02 17:40:55

mindplay.dk
New member

Re: console.log feature not working when refreshing page

I am using jQuery on ExtJS - no plugins. Should that be a problem?

Offline

 

#7 2008-10-02 17:51:42

mindplay.dk
New member

Re: console.log feature not working when refreshing page

I searched through all loaded JavaScript files, the word "console" does not figure anywhere. Ext has something called createConsole(), but it's not touching anything that variable.

To confirm that, I also tried putting a window.alert(console.toString()) as the first line in the <head> on my page - it's already been overwritten at this point, so whatever is causing this, it's something within the browser itself.

I do have the Microsoft IE Developer Toolbar installed, but it doesn't have a console, so I don't know how that would affect it?

Offline

 

#8 2008-10-02 17:55:10

mindplay.dk
New member

Re: console.log feature not working when refreshing page

Also tried disabling all other plugins, including Java and the Microsoft IE Developer Toolbar - the situation is the same.

Offline

 

#9 2008-10-02 18:16:26

fabrice
DebugBar Support

Re: console.log feature not working when refreshing page

And when you disable Companion.JS, (there are 2 plugins with the names : "Companion.JS" and "Companion.JS  BHO") ? Do you still have a "console" object defined ?
If so, there is something on your config or your page.
Are you using IE8 or UE 7 ? which OS ?

Do you have a public url where I can see the loaded page ?

Offline

 

#10 2008-10-02 18:49:47

mindplay.dk
New member

Re: console.log feature not working when refreshing page

Argh! Turns out the developer who was working on this before me thought it was clever to create a function in the global scope named console() ... I searched everywhere for this, until finally I just did a "find in files" from the root directory, and sure enough, somewhere in there, somebody overwrote the console object.

I suggest anyone else experiencing this problem try the same - find in files...

I also would like to suggest that, in Companion.JS, after a page load (and DOM complete), do a check for the console object, and issue a warning in the popup or console. You could probably even list the filename and linenumber where the overwriting function/object was defined? Might save others some headaches :-)

Offline

 

#11 2008-10-02 18:57:49

mindplay.dk
New member

Re: console.log feature not working when refreshing page

... and you from having to answer this question again ;-)

Offline

 

#12 2008-10-02 21:41:47

fabrice
DebugBar Support

Re: console.log feature not working when refreshing page

Good idea, I will do it in a future version.

Offline