Hacker News new | past | comments | ask | show | jobs | submit login

Intellij can drop breakpoints on the Either::map, or in the lambda contained therein. It's really not much different than debugging the if version.

The problem isn't breakpoints so much as stepping through them. You either step through the whole chained method at once, or have to set a breakpoint inside of it. Whereas with loops you can step through loop iterations easily with no additional work.

Honestly, this hasn't been a problem. If I get a bad result I merely figure out where I went from a left to a right (and there will only be one spot where that happened), and debug that function only. I've never had to debug the entire chain from top to bottom, ever.

But if you're really worried, set a breakpoint in each lambda (trivial in IntelliJ) and use continue instead of step over.

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