4 ms·
That's not a "TypeScript" problem. That's a "JS being transpiled and bundled" problem (of which TS is just one possible example of "transpiling"). JS debuggers
by acemarke 4y ago
That's not a "TypeScript" problem. That's a "JS being transpiled and bundled" problem (of which TS is just one possible example of "transpiling").
JS debuggers (browsers, VS Code, etc) normally use sourcemaps to show you what the original source looked like so you can debug that.
Also, I'll put in a plug for my day job, Replay ( https://replay.io https://replay.io ). Our app is meant to help simplify debugging scenarios by making it easy to record, reproduce and investigate your code.
The basic idea of Replay: Use our special browser to make a recording of your app, load the recording in our debugger, and you can pause at any point in the recording. In fact, you can add print statements to any line of code, and it will show you what it would have printed every time that line of code ran!
From there, you can jump to any of those print statement hits, and do typical step debugging and inspection of variables. So, it's the best of both worlds - you can use print statements and step debugging, together, at any point in time in the recording.
See https://replay.io/record-bugs https://replay.io/record-bugs for the getting started steps to use Replay.
Note that Replay also works best when you have sourcemaps, same as the other debugger tools.
- jskulski 4y agoCrazy, I was watching some some smalltalk 80 demos this weekend. And was like I bet you could ship a js image that does some of this. Someone must be working on it. I don’t know if that’s your teams inspiration but there’s a a lot of overlap.