ObjectID showing Unicode clutter instead of string

When I debug a Node application, my ObjectId appears as Unicode, for example, ObjectID {id: RýÕ/H}instead of the actual readable identifier. Here is a screenshot . Does anyone know what causes this?

I am using WebStorm 7.0.1 on Crunchbang Waldorf x64.

UPDATE: After checking in the node-inspector, I get the same results: http://i.imgur.com/8dxOGhd.png

The only time I can see my ObjectId correctly is to check them in Robomongo (MongoDB GUI), or if I register them on the console from a Node application.

+4
source share
3 answers

Unfortunately, this is exactly how WebStorm works. You can quickly evaluate using object.toString()debugging if you need it. Instead of showing WebStorm something friendly, it was showing a binary representationObjectID.

+2
source

I had the same problem while doing the Node.js and MongoDB exercises from this book: https://leanpub.com/nodecraftsman . The code I'm talking about is on page 83, line 12.

I ran and tested everything through the command line.

, ( № 12) console.dir(). console.log(), , , - , 54e95c6f322fd679214d3a18, , , Té\o2/Öy! M:\u0015

MDN console.dir() "", , , - . : https://developer.mozilla.org/en-US/docs/Web/API/Console/dir

0

This is a bug in WebStorm. They track the problem here:

https://youtrack.jetbrains.com/issue/WEB-9945

0
source

All Articles