Is there a tool for node.js that will give me the list of all the objects in the heap denoted by their class name string?

I am trying to debug a high memory usage situation in a node.js service thats touching almost 1.5 GB of Resident memory usage according to top. I need to see which objects are the culprits of the usage.

You can try :

  1. nodetime: See the docs on how to profile memory. A blog on how to detect memory leaks. It can show the largest memory blocks in the heap.
  2. node-inspector with v8-profiler: Heap snapshots may be taken and viewed from the profiles panel.

To use the inbuilt V8 profiler from command line you can :

  1. To build from source: node-gyp configure build install
  2. Or, if you have npm installed: npm install profiler (See profiler for more details)

You can see other profilers mentioned here and here.