Visual Studio showing {...} as value for Javascript variable in debugger
Visual Studio 2010 shows '{...}' in the debugger as the value for a Javascript variable. The type is object. How can I view the contents of the variable? There's no expansi开发者_运维知识库on 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/
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.
精彩评论