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 expansion icon.
A:
Probably the object variable has no properties. Any object which has no properties will show the value as "{...}"
Kunal
2010-09-09 07:40:50
The variable was used in an equation as in var callback = somefunctionname and then it was used as an argument to a function. Then callback showed as {...} in the debugger.
Tony_Henrich
2010-09-10 00:46:24
A:
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/
James Wiseman
2010-09-09 07:50:46
A:
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.
Tony_Henrich
2010-09-10 16:14:18