4 ms·
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 diffic
by Buttons840 4y ago
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.
- liveoneggs 4y agohttps://stackoverflow.com/questions/34087143/load-separate-sourcemap-file-in-chrome-dev-tools https://stackoverflow.com/questions/34087143/load-separate-s...
- flohofwoe 4y agoVSCode works well, both for command line stuff via node.js or Deno, and for (remote) browser debugging: https://code.visualstudio.com/docs/typescript/typescript-debugging https://code.visualstudio.com/docs/typescript/typescript-deb... https://code.visualstudio.com/docs/nodejs/browser-debugging 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)