Add a quick tip for Node.js debugging in Chrome
This commit is contained in:
BIN
blog_images/chrome-debug-node.png
Normal file
BIN
blog_images/chrome-debug-node.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 32 KiB |
BIN
blog_images/nodejs-chrome-debugging.jpg
Normal file
BIN
blog_images/nodejs-chrome-debugging.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 MiB |
20
blog_posts/nodejs-chrome-debugging.md
Normal file
20
blog_posts/nodejs-chrome-debugging.md
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
title: Debugging Node.js using Chrome Developer Tools
|
||||||
|
type: story
|
||||||
|
tags: javascript,node,debugging
|
||||||
|
authors: chalarangelo
|
||||||
|
cover: blog_images/nodejs-chrome-debugging.jpg
|
||||||
|
excerpt: Did you know you can use Chrome Developer Tools to debug your Node.js code? Find out how in this short guide.
|
||||||
|
---
|
||||||
|
|
||||||
|
Node.js can be debugged using Chrome Developer Tools since `v6.3.0`. Here's a quick guide on how to do this:
|
||||||
|
|
||||||
|
1. Download and install Node.js `v6.3.0` or newer, if you don't already have it installed on your machine.
|
||||||
|
2. Run node with the `--inspect-brk` flag (e.g. `node --inspect-brk index.js`).
|
||||||
|
3. Open `about:inspect` in a new tab in Chrome. You should see something like the screenshot below.
|
||||||
|
4. Click `Open dedicated DevTools for Node` to open a new window connected to your Node.js instance.
|
||||||
|
5. Use the Developer Tools to debug your Node.js application!
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
**Image credit:** [David Clode](https://unsplash.com/@davidclode?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/code?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
|
||||||
Reference in New Issue
Block a user