iOS App crashes when setting breakpoint in Xcode

老子叫甜甜 提交于 2019-12-12 04:43:18

问题


I have an app I'm developing where setting a breakpoint in Xcode while the app is running causes it to crash. At least I assume it is a crash. There is nothing in the console saying what happened. The app just terminates.

Note that the break point is not being hit, just the act of setting it causes this.

I've developed many apps and this is the first to act like this. Does anyone have any ideas what could be happening or how to figure this out? It is really slowing down my debugging.


回答1:


I'm assuming you're using Xcode 4.x. Try going into your scheme's settings and switch to a different debugger (GDB if you have LLDB currently set, or vice versa).

If that doesn't work, we need more info:

  • which version of Xcode and iOS are you using?
  • does the problem occur in the Simulator or on your device, or both?
  • have you tried placing a breakpoint in different places in your code?

As far as I can tell, it's a debugger issue. So your app does not actually crash, it's the debug session that crashes which causes the app to terminate. You can observe a similar effect when you hit Stop in Xcode or disconnect your device while an app is attached to the debugger in Xcode.

Might be an issue with mismatching Xcode and iOS versions. Please provide more info about your environment to help diagnose the problem.



来源:https://stackoverflow.com/questions/13635577/ios-app-crashes-when-setting-breakpoint-in-xcode

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!