Use the Chrome DevTools to debug a Node.js app
FULL-STACK WEB DEVELOPMENT BOOTCAMP
2024 COHORT SIGNUPS END TOMORROW
When we're programming it's common to have the need to quickly test and do some experiments with a piece of code.
How can we do the same with Node.js code, and debug Node modules with access to the filesystem and other Node.js capabilities? It’s very simple, actually.
Open your terminal and run
Then in Chrome type this URL:
Open dedicated DevTools for Node link next to the Node target, and you’ll have access to Node.js in the browser DevTools:
Make sure you click that, and not the
inspect link down below, as it tool auto-reconnects to the Node.js instance when we restart it - pretty handy!