To make use of devtools debugging, you can start node tasks with the debugging flag. This allows you to open devtools in Chrome and use the tools there for better inspection of objects, breakpoints, etc.
export NODE_OPTIONS="--inspect"; npm run dev
You can also do this automatically in some IDEs and code editors:
- https://www.builder.io/blog/debug-nodejs
- https://mozilla.github.io/ecosystem-platform/how-tos/node-debugging
- https://nodejs.org/en/learn/getting-started/debugging
- https://www.jetbrains.com/help/webstorm/running-and-debugging-node-js.html
- https://blog.logrocket.com/debug-node-js-chrome-devtools-watchers/
- https://www.digitalocean.com/community/tutorials/how-to-debug-node-js-with-the-built-in-debugger-and-chrome-devtools
- https://www.youtube.com/watch?v=gFcR8J90S8c
- https://www.youtube.com/watch?v=r1kwXZnO8gw