Hacker News new | ask | show | jobs
by madeofpalk 949 days ago
It does. `node --inspect-brk`. You can connect to it with VS Code or Chrome dev tools. The tricky part is whether there's build tooling infront of just the nodejs command, like converting typescript or something like that. But if you run `node`, then it's pretty easy.

Its debugging REPL is just the javascript console itself.

1 comments

I looked into that a little bit, but I've got this TS transpiling crap to deal with as well, and I don't want to lose my live code reloading.

I guess I'll try again when I find the time. Was hoping there was some 3rd party package I could use to just drop in and set a trace. Thanks.

That should work fine in the vscode debugger, you just want to make sure that the transpiler you're using is generating sourcemaps. Generally they do by default. If you have issues, open a github issue and I'll fix it :)