最新消息:20210816 当前crifan.com域名已被污染,为防止失联,请关注(页面右下角的)公众号

【未解决】xcode中添加符合一定判断条件的断点

Xcode crifan 2632浏览

想要给xcode中添加符合一定条件判断的断点

比如:id为user-e201ca43-3c30-4720-b9a6-61f2f9e3b6d5时再去中断运行,供调试

xcode breakpoint condition

objective c – How to set a conditional breakpoint in Xcode based on an object string property? – Stack Overflow

Using Breakpoints in Xcode – Jeffrey Sambells

Setting Breakpoint Actions and Options

Xcode conditional break points · paul-samuels.com

Xcode conditional breakpoints

Xcode – power of breakpoints

对于已有断点,右击-》Edit Breakpoint

结果导致挂了:

[已解决]iOS app调试时挂了停在symbol stub for getpid

最后无奈,暂时用代码去判断条件,中断执行:

        //for debug

        if newContactItem.id == "user-e201ca43-3c30-4720-b9a6-61f2f9e3b6d5" {

            gLog.debug("\(newContactItem.type) \(newContactItem.name) \(newContactItem.id)")

        }

转载请注明:在路上 » 【未解决】xcode中添加符合一定判断条件的断点

81 queries in 0.236 seconds, using 19.16MB memory