Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I often use prints to find the suspect, and then debugger to weed it out. Conditional breakpoints make it easy to stop at the correct place.

About your debugging from the beginning: with Intellij on the jvm one can "drop frame", which is basically to discard the current function and start over with the stack as it was. Since I mostly write kotlin my objects are immutable, so rerunning most stuff actually works fine. And hot-swapping the function while the debugger is paused I can even try multiple implementations without having to rerun everything, just drop frame, hot swap, step into the new and updated function.

I'd say knowing the debugger well and using it is a faster way to iterate than not.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: