Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
假设在我的代码中命中了以下断言:
NSAssert(NO, @"This assert should always be hit.");
在堆栈跟踪的顶部,打印了文件的整个路径:
Assertion failure in +[Foo barMethod:], /Users/foo/code/SomeFramework/SomeFolder/file.m:12
出于隐私原因,是否有一种简单的方法可以使打印的路径静音,或者只打印file.m:16而不影响堆栈跟踪的质量?
file.m:16