Can I create a breakpoint in code in iOS, like `__asm{int 3}` on VC++, and continue execution after it's been hit?

前端 未结 9 2163
终归单人心
终归单人心 2020-12-30 04:24

I\'m trying to put the equivalent of asm{int 3} (or similar) into my iPhone program. My goal is to have Xcode stop exactly on the offending line, without having

9条回答
  •  长情又很酷
    2020-12-30 05:07

    std::runtime_error::runtime_error("breakpoint")
    

    together with an XCode exception breakpoint of type

    Exception:C++ "named:std::runtime"

    worked for me (using XCode 8.0).
    It yields the same result as if I had set a breakpoint manually at the line where the

    std::runtime_error::runtime_error
    

    function is called, i.e. correct thread, correct call stack, and the possibility to resume.

提交回复
热议问题