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

守給你的承諾、 提交于 2019-12-04 08:48:32

I had the same difficulty, until I tried using Xcode 4's LLDB debugger (go to Product>Edit Scheme to turn it on). Perhaps you'll have better luck with it.

From the documentation

You can set breakpoints and single step into blocks. You can invoke a block from within a GDB session using invoke-block, as illustrated in this example:

$ invoke-block myBlock 10 20

If you want to pass in a C string, you must quote it. For example, to pass this string into the doSomethingWithString block, you would write the following:

$ invoke-block doSomethingWithString "\"this string\""
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!