During the development of enhanced developer tools (see
http://blog.chromium.org/2009/06/developer-tools-for-google-chrome.html)
the dumping of objects to the console have been somewhat broken. This
is now working in the latest dev-channel release (3.0.190.1 for
Windows) with interactive dumping of objects in the console. Note that
with the developer tools the default behavior is to break on
exceptions. You can switch that off using a button on the "Scripts"
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 an error fires, 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 the error has 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-catch error output (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
-~----------~----~----~----~------~----~------~--~---

Reply via email to