logo

Debugging with NodeJS

🌱 2024-01-27


Inspect a file in Chrome by adding --inspect-brk

node file-to-inspect.js --inspect-brk

-inspect-brk pauses execution immediately vs. -inspect pauses execution if it hits a debugger statement and there is an attached debugger

Debug NextJS

NODE_OPTIONS='--inspect-brk' next dev

nvim-dap-ui for NeoVim is a wondeful addition. You can set it up by using this