最近程序总是出现
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
* First throw call stack:
(0x185aa82d8 0x196ef40e4 0x18598f4c0 0x18a816f80 0x18a555704 0x18a56d2c4 0x18a7234f4 0x18a706f10 0x1003de5c8 0x1004c22fc 0x1001c6040 0x185a4e2c4 0x18598b450 0x1868baa80 0x100197670 0x100184d20 0x1001835dc 0x10072146c 0x1869a9f9c 0x185a60240 0x185a5f4e4 0x185a5d594 0x1859892d4 0x18f2876fc 0x18a586f40 0x10024fae0 0x19759ea08)
我想设置一个条件断点,当insertObject第一个参数为nil时触发断点,否则程序继续运行。
如何设置condition呢?谢谢。

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
使用assert语法,不用设置断点
assert(someVar != nil, "Some alert information")