Inspecting variables using node's built-in debugger? Inspecting variables using node's built-in debugger? node.js node.js

Inspecting variables using node's built-in debugger?


Use repl command ( see third example in docs )

break in hotplate/node_modules/bd/lib/bd.js:133132 133   debugger;134 135   // Delete the ID and the version since there's no point,debug> replPress Ctrl + C to leave debug repl> Workspace

Update: bonus question - https://github.com/c4milo/node-webkit-agent


The answer to the bonus question has changed in 2018.

Run node inspect foo.js.

Visit chrome://inspect and in the list of devices you should see an entry that says Target (<process.version>) with an accompanying inspect link.

It looks like this:enter image description here