0
votes

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
after connecting the device click build and run option from the xcode.are you doing the same? - Dinakar
while testing on device check NSLog in window->Organizer->Device logs - iAmitWagh
Are you sure that the app is actually getting to your code that has the breakpoints and log statements? - Philip Regan
@phillip:Yes app is working fine with all alerts etc - Pankaj Kainthla
@efrank: Tried everything from build and debug to build and run etc - Pankaj Kainthla

3 Answers

4
votes

Do you have breakpoints enabled in xCode?

enter image description here

Should be looking like this;

enter image description here

0
votes

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 :)

0
votes

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.