Xcode equivalent of ' __asm int 3 / DebugBreak() / Halt?

后端 未结 7 1393
予麋鹿
予麋鹿 2020-12-14 07:51

What\'s the instruction to cause a hard-break in Xcode? For example under Visual Studio I could do \'_asm int 3\' or \'DebugBreak()\'. Under some GCC implementations it\'s a

7条回答
  •  北荒
    北荒 (楼主)
    2020-12-14 08:35

    For posterity: I have some code for generating halts at the correct stack frame in the debugger and (optionally) pausing the app so you can attach the debugger just-in-time. Works for simulator and device (and possibly desktop, if you should ever need it). Exhaustively detailed post at http://iphone.m20.nl/wp/2010/10/xcode-iphone-debugger-halt-assertions/

提交回复
热议问题