I am a front-end developer.I'm learning node.js now.it's unusual for me to see console in Terminal.Is it possible to configure so that the console is visible in Chrome ?.
1 Answer
Yes, you can use node inspector module or if your Node Version is v6.3.0+ you already have this functionallity:
Using --inspect command from Node v6.30.0+ :
- Run your JS file with:
node --inspect YOUR_FILE_NAME.js - Go to
about:inspectin Chrome. - Then in "Devices" click on "Open dedicated DevTools for Node"
- Now you have your Chrome Dev Tools integrated with your Node application.
Using Node Inspector module:
- Install the module globally:
$ npm install -g node-inspector - Start the module with:
node-debug YOUR_FILE_NAME.js
Fonts: Debugging Node.js with Chrome DevTools
Node Inspector documentation