mirror of
https://github.com/NohamR/knowledge-kit.git
synced 2026-05-24 20:00:37 +00:00
docs: ragdoll
This commit is contained in:
@@ -18,13 +18,14 @@
|
||||
Xcode 在 Debug 模式下定义了宏 DEBUG=1 ,所以我们可以在代码中把相关的测试代码写在预编译处理命令 **\#ifdef DEBUG... \#endif** 中间即可,如图所示
|
||||
|
||||

|
||||
|
||||
|
||||

|
||||
|
||||
* 测试用的 .a 和 .framework
|
||||
|
||||
|
||||
对于拖拽到工程中的 .a .framework 静态库,可以在 **target->Build Settings->Search Paths**这2个选项,分别设置 **Library Search Paths**和**Framework Search Paths**这2个选项。如果我们需要在测试的时候会用到,那么我们可以将 **Debug** 对应的值留下,删掉**Release** 对应的值。这样我们打包 Release 包的时候就不会包含不需要的包。
|
||||
|
||||
|
||||

|
||||
|
||||
* CocoPods 引入的库
|
||||
@@ -81,3 +82,14 @@
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
|
||||
10. Xcode Instruments 内存泄漏检测工具 Leaks 在内存检测后,无法看到具体的堆栈信息。
|
||||
|
||||

|
||||
|
||||
涂上右下方的 `Heaviest Stack Trace` 模块看不到对应的堆栈信息。一番定位问题后发现是工程项目在 debug 阶段,Build Setting 中的 **Debug Information Format** 选项的 debug 条目是没有 dSYM 文件的,我们要想看到堆栈信息,就必须选择 `DWARF with dSYM File` 选项。
|
||||
|
||||

|
||||
|
||||
DWARF,即 ***Debug With Arbitrary Record Format*** ,是一个标准调试信息格式,即调试信息。这部分信息可以查看我的[这篇文章](./1.74.md)中讲 iOS 符号化的部分。
|
||||
|
||||
11.
|
||||
Reference in New Issue
Block a user