How can I debug effectively with blocks in Xcode

ios, xcode

Solution

Do you use breakpoint with automatically console dump (without stopping your running app)?

There is a far from excellent, but really usable tutorial about intermediate debugging.

Happy coding!

Problem

I'm really struggling with debugging code on our big ios project. It seems like everyone has gone nuts on putting blocks and dispatch queues everywhere. When I'm asked to debug a chunk of code, I really like to step through it and watch how things change, and see what is really happening with variables. I can't really do that easily with all the blocks that have been put in for two reasons: I have to put a breakpoint within each little block to stop in that block. Within a block, the variables from without the block are not displayed in a useable fashion, and can't be easily dumped to the console with a po command. Is there an easier or better way to step through/evaluate code that is rife with blocks? Or am I missing something here?

Original source