In Xcode, how do I add a breakpoint inside a block?

I have a method that returns a block. I want to add a breakpoint inside the block. In Xcode, adding a breakpoint on the line that inside the block causes execution to pause when the method returns, and not when the block is executed. How to add a control point inside a block?

+5
source share
2 answers

I had the same difficulty until I tried using the LCDB Xcode 4 debugger (go to Product> Edit Scheme to enable it). You might be lucky with him.

+1
source

From the documentation

. GDB invoke-block, :

$ invoke-block myBlock 10 20

C, . , doSomethingWithString, :

$ invoke-block doSomethingWithString "\"this string\""
0

All Articles