Quick Watch showing No Children when viewing an Array Passed in through Socket.IO

Jan 20, 2015 at 12:17 PM
I spent the last couple of days debugging Socket.io to figure out why the array I was passing in through the emit function (from the client to the server) was showing the message "No Children" when I viewed the array in Quick Watch. In a few minutes I found the code where the data was getting corrupt; JSON.parse method. I took the same data and ran it through Node.js interactive and it was coming back successful so it wasn't making any sense. I then tried to stringify and parse the data myself so I could eliminate the code in Socket.io and received the same results. I created another project to test different scenarios because I knew something had just changed because this was working the day before. At the end of the second day I decided to just pass the data as a concatenated string of data plus ":" and "#" as separators ("reportType:CA#reportDuration:MN#startDate:2005-01-15") so I could use the Array split method to recreate my JS objects on the server side. When I went to view my array I saw the same No Children message. At this point I knew there was data in the array so I just typed, "queryDataIn[0].id" (I recreated id="reportType" and value="CA" for each object in my new method to recreate the object array) and my value showed up. So it appears the latest release of Node.js Tools for Visual Studio which I installed just prior to having the problem is not properly displaying the array contents.
Coordinator
Jan 20, 2015 at 4:24 PM
Are you on Node.js v0.10.34 or v0.10.35, by chance? There's a generic bug there (on the Node side of things) that prevents object children from being displayed for pretty much anything.
Jan 20, 2015 at 7:06 PM
I am currently running v0.10.35.
Coordinator
Jan 20, 2015 at 8:06 PM
Then you're running afoul of the bug that I've mentioned. This affects all Node IDEs, and the only fix right now is to downgrade to v0.10.33. It is supposed to be fixed in v0.10.36 once that ships.

More details here:
https://nodejstools.codeplex.com/workitem/1659
https://github.com/joyent/node/issues/8948