4 ms·
Firstly, JS is a horrendous target. Second, breakpointing in another language is about as great (possibly worse) as debugging via printf.
by chrismsimpson 3y ago
Firstly, JS is a horrendous target. Second, breakpointing in another language is about as great (possibly worse) as debugging via printf.
- pmoriarty 3y agoprintf debugging is infinitely better
- chrismsimpson 3y agoAgreed
- auggierose 3y agoDepends on your needs. In terms of functionality, JS has everything you might want, even the ability to execute itself. Viewed as a platform, not just a language, it offers WebAssembly, soon WebGPU. I don't see anything else that comes even close as a target platform!
- JonChesterfield 3y agoThe usual choice is C. I'm currently liking luajit as the tracing cuts through some of the DSL. The JavaScript compilers probably manage the same thing.
- viraptor 3y agoUnless you write a basic interpreter or code in plain binary, you're breakpointing in another language. It's really not a big deal as long as you preserve the mapping to the original code. When you breakpoint in C, you breakpoint in assembly and find your C location from the debug information for example.
- hu3 3y ago> Second, breakpointing in another language is about as great (possibly worse) as debugging via printf. You don't have to. Just generate sourcemaps and you'll be able to set breakpoints in your own language even when targeting JS. If anything that makes JS an even better target since you can leverage tooling.