在IE Developer Tools控制台中显示对象 [英] Displaying objects in IE Developer Tools console

查看:150
本文介绍了在IE Developer Tools控制台中显示对象的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Firefox,Chrome和Internet Explorer中调试我的网络应用程序。使用后者我正在使用Developer Tools来调试我的脚本。

I'm debugging my web application in Firefox, Chrome and Internet Explorer. With the latter I'm using Developer Tools to debug my scripts.

我遇到的问题是当我在 console 窗口,它应该返回一个对象我只能看到一个简单的 {...} ,这实际上并没有用。

The problem I'm having is that when I write some expression in console window and it should return an object all I can see is a simple {...} which isn't really helpful.

是否可以使其与实际显示对象内容的Firebug或Chrome控制台类似。 Chrome在这方面是最好的,因为您可以像在Visual Studio中一样直接遍历整个对象。

Is it possible to make it work similar to Firebug or Chrome console that actually display object content. Chrome is the best in this regard, because you can directly traverse the whole object as in Visual Studio.

无论如何。是否有可能使IE Developer Tools控制台显示对象属性及其值?

Anyway. Is it possible to make IE Developer Tools console to display object properties and their values?

推荐答案

如果 Prototype API 是一个选项,您可以像这样调试对象:

If the Prototype API is an option, you can debug your objects like so:

var obj = window.JSON.parse('{"d":"2010-01-01T12:34:56Z","i":123}');
alert($H(obj).inspect());

除此之外,我知道没有其他方法可以获取非常有用 {...}

Other than that, I know of no other way to not get the really helpful {...}.

这篇关于在IE Developer Tools控制台中显示对象的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆