Debugger does not stop at breakpoints when running

2019-09-05 07:18发布

I want to test my app on device and see all the NSLOGs on console while runnig the ap on device.I also want to stop the app at breakpoints but app does not stop on breakpoints and not print NSLOGs .I have unchecked load symbols lazily .I am using a debug build .Please tell me how to achieve this Thanks in advance

NOTE:After starting the app x code shows the app being debugged is not being run (I think the problem is after xcode transfers the app to device then it disconnects with device)

3条回答
地球回转人心会变
2楼-- · 2019-09-05 07:20

Try to set breakpoint in the didFinishLaunchingWithOptions then the viewwillappear of the view you want to test the breakpoints on. basically any places before your code (which you want to test) which surely get called.

I had same problem before not exactly sure why does it happen though. it's like preparing Xcode to look for breakpoints :)

查看更多
老娘就宠你
3楼-- · 2019-09-05 07:20

Sounds like you're working with a jailbroken device .. Is that the case ?
If you are , the "official" answer should be "disable mobileSubstrate addons".
I've managed to run the app in debug mode , after :

  1. Doing what you mentioned (got that error message).
  2. Double tap home-button , hold the app icon, close the app..
  3. Run it again from XCode.
  4. Repeat again if necessary.
查看更多
聊天终结者
4楼-- · 2019-09-05 07:23

Do you have breakpoints enabled in xCode?

enter image description here

Should be looking like this;

enter image description here

查看更多
登录 后发表回答