During the development for the new developer tools (see http://blog.chromium.org/2009/06/developer-tools-for-google-chrome.html) showing objects in the console was broken somewhere along the road. This is now working again in the latest dev-channel build (which for Windows is 3.0.190.1, see http://googlechromereleases.blogspot.com/), together with showing live objects in the console. Note that with the updated developer tools the default behavior is for the JavaScript debugger to break on exceptions. This can be turned off by pressing a button on the "Scripts2 tab.
regards, Søren On Jun 16, 3:52 pm, disya2 <[email protected]> wrote: > Hi, > > I use Javascript console for debugging and for tracing execution of > extension scripts and content scripts. I found some issues, the use > cases are: > > When anerrorfires, e.g. "TypeError: Object x has no method 'y'" > 1. if I don't catch it the output would be > (x) [object Object] > printed with red font, no hint where theerrorhas happened. > > 2. In case I use try { } catch (e) { console.log(e); } I get > [object Object] > printed with black font, there is a link on the line where console.log > is called. > > 3. But in the case when I use toString() method for the exception: > try { } catch (e) { console.log(e.toString()); } > The output would be meaningful > TypeError: Object x has no method 'y' > and there is a link where console.log() was called. > > I believe 1. is a bug or something because printing reddish [object > Object] meaningless. Also I don't really understand the reason behind > 2 and 3. > I guess that console.log() should call toString() method of the > argument object for the output form cases 2 and 3 being the same. > > Also I should say that _sometimes_ the non-catcherroroutput (case 1) > prints some meaningful information. > > Denis > PS. I use 3.0.187.1 for Windows running under Wine. --~--~---------~--~----~------------~-------~--~----~ Chromium Discussion mailing list: [email protected] View archives, change email options, or unsubscribe: http://groups.google.com/group/chromium-discuss -~----------~----~----~----~------~----~------~--~---
