5 ms·
In a narrower sense of the word, one technique I developed early on in my career that I don’t see mentioned very often is exploratory debugging. At its most bas
by pdpi 2y ago
In a narrower sense of the word, one technique I developed early on in my career that I don’t see mentioned very often is exploratory debugging. At its most basic, you run the program, look at the output and find the output string in the source code. Then you set a breakpoint there, and go again. You’re now in a place where you can start understanding the program by working backwards from the output.
One thing that makes me sad about the pervasive use of async/await-style programming is that it usually breaks the stack in a way that makes this technique a bit useless.
- eternityforest 2y agoI don't know why they don't fix this. Can't they reconstruct the chain of awaits somehow by addition some metadata to whatever objects they use to keep track of async stuff?
- catskull 2y agoIn Safari, I've had good success setting breakpoints in client side JS. The call stack isn't perfect, but usually it's at least enough to get me to the next step. The other thing I'd mention is request/response overrides in those cases you're debugging in production!