Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

After recently doing some JavaScript work and not knowing how to debug it, any suggestions for a JavaScript debugger? Part of the problem is it's already difficult to get a modern JavaScript stack setup: TypeScript transpiles to JavaScript trasnpiles to different bundles that all get minified and backfilled and next thing you know your debugging a variable named i̷̪̱͆͛w̵̤̹̠͊̇̈x̷̨̻̽̍̄͆ on line 582956, and you ask your coworkers for help and none of them have ever used anything but console.log and are like ¯\_(ツ)_/¯ -- it was traumatic.



VSCode works well, both for command line stuff via node.js or Deno, and for (remote) browser debugging:

https://code.visualstudio.com/docs/typescript/typescript-deb...

https://code.visualstudio.com/docs/nodejs/browser-debugging

The JS-to-TS mapping is handled through source map (so you're 'debugging' the TS code, even though it's JS under the hood).

(also, in case you're not aware, browsers have a builtin debugger in their devtool panel, these also have source map support, but this may require some tinkering)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: