在项目图形树显示的“ Targets”下,右键单击 Target 并执行“ Get Info”查找名为“ GenerateDebug 符号”(或类似的)的属性,并确保该属性为 CHECKED (aka ON)。此外,您可以尝试查找(也在 Target > > Get Info 中)一个名为“ Debug Information Format”的属性,并将其设置为“ Dwarf with dsym file”
在 Target > > Get Info 下面还有许多其他属性可能会影响到您。寻找像优化或压缩代码这样的事情,然后关闭这些东西(我假设您正在调试模式下工作,这样这个建议就不错了)。此外,寻找像剥离符号的东西,并确保这也是关闭的。例如,“ Strip Linked Product”应该为 Debug 目标设置为“ No”。
- Product menu > Manage Schemes
- Select the scheme thats having debugging problems (if only one choose that)
- Click Edit button at bottom
- Edit Scheme dialog appears
- in left panel click on Run APPNAME.app
- on Right hand panel make sure youre on INFO tab
- look for drop down DEBUGGER:
- someone had set this to None
- set to LLDB if this is your preferred debugger
- can also change BUILD CONFIGURATION drop down to Debug
- but I have other targets set to AdHoc which debug fine once Debugger is set