O'Reilly logo

TypeScript Microservices by Parth Ghiya

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Live Debugging/Remote Debugging

The penultimate and important feature is to debug a problem live. With the introduction of the inspector protocol inside Node.js, this becomes a piece of cake as all we have to do is create an --inspect version of running the process. This will print the URL of the process on which debug is open, something like this:

Debugger listening on ws://127.0.0.1:9229/1309f374-d358-4d41-9878-8448b721ac5c

You can install the Chrome extension Node.js V8 --inspector Manager (NiM), from https://chrome.google.com/webstore/detail/nim-node-inspector-manage/gnhhdgbaldcilmgcpfddgdbkhjohddkj for debugging remote applications or you can even spawn a process for debugging and specify a port with:

node inspect --port=xxxx <file>.js ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required