[英]Visual Studio showing {…} as value for Javascript variable in debugger
Visual Studio 2010 shows '{...}' in the debugger as the value for a Javascript variable. Visual Studio 2010在调试器中显示“ {...}”作为Javascript变量的值。 The type is object.
类型是对象。 How can I view the contents of the variable?
如何查看变量的内容? There's no expansion icon.
没有扩展图标。
Probably the object variable has no properties. 对象变量可能没有属性。 Any object which has no properties will show the value as "{...}"
任何没有属性的对象都将其值显示为“ {...}”
You could check in in code with the following: 您可以使用以下代码签入代码:
var obj = {mem:1};
for (var a in obj)
{
alert(a); //alert the object member
alert(eval("obj." + a)); //alert the member value
}
See it at this fiddle: http://jsfiddle.net/uG6H6/ 在这个小提琴上看到它: http : //jsfiddle.net/uG6H6/
A function was assigned to the variable. 函数已分配给变量。 Visual Studio doesn't seem to show anything when a function is assigned to a variable.. There's more information in Firebug.
将函数分配给变量时,Visual Studio似乎什么也不显示。Firebug中有更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.