4 ms·
Why not use chrome devtools to debug node? It's now a built-in feature as of v6.3.0 and no longer requires the 3rd-party and kinda buggy node-inspector module.
by AgentME 10y ago
Why not use chrome devtools to debug node? It's now a built-in feature as of v6.3.0 and no longer requires the 3rd-party and kinda buggy node-inspector module. Just use the --inspect command-line flag. (--debug-brk too if you want it to start paused on the first line.)
- nnq 10y agomaybe you're on a test server (no GUI) and for whatever reason you also don't want to remote debug with node-inspector, you want it all quick and dirty via ssh ;) Python's "baked in" command line debugger that you get via `import pdb; pdb.set_trace()` is awesome for this kind of quick and dirty ssh debugging so if you're looking for inspiration on how node's command line debugger should work, check it out. I always miss python's pdb when working with JS or PHP or... anything else.
- afarrell 10y ago1) Because then I have to move the mouse to click on tiny UI elements and that takes a long time. 2) Because then I need another browser window open and that takes up more screen real estate than a terminal 3) Because my browser background is white and reading code on it is less pleasant 4) Because then the place where I say "run these backend tests" and the place where I pop into the debugger are different.