Re:Rust, RR, Neovim: A perfect debug combination
by Buttons840 on Tuesday April 11, 2023 @06:53AM
(#35523315)
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.
[ Parent
| on HN ]
Re:Rust, RR, Neovim: A perfect debug combination
by liveoneggs on Tuesday April 11, 2023 @07:11AM
(#35523437)
Re:Rust, RR, Neovim: A perfect debug combination
by flohofwoe on Tuesday April 11, 2023 @08:21AM
(#35524151)
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)