July 2017
Intermediate to advanced
656 pages
16h 1m
English
The --inspect flag and protocol were introduced in Node 6.3.0, primarily because the V8 engine had changed the debugging protocol. In Node 6.2.0 and down, there's a legacy debugging protocol enabled with the --debug flag, but this isn't compatible with the native Chrome Devtools UI.
Instead, we can use the node-inspector tool, as a client for the legacy protocol.
The node-inspector tool essentially wraps an older version of Devtools that interfaces with the legacy debug API, and then hosts it locally.
Let's install node-inspector:
$ npm i -g node-inspector
This will add a global executable called node-debug, which we can use as shorthand to start our process in debug mode.
If we could run our ...