0

I recently archived and uploaded my app for release for the first time. However, now when I try to print to the debugger, nothing is appearing. Also, breakpoints are not being activated when I run the simulator.

I am using Xcode 7.3, the latest at the time of this writing. My app contains a keyboard extension. Neither are printing to the debugger or triggering breakpoints. The debugger pane is set to show "All Output".

As far as I can tell, it is still using the "Debug" scheme, I never manually changed it. Would it have changed when I archived and uploaded the .ipa to iTunes Connect? What would have changed?

With your suggestion, can you be thorough in your suggestion? I may not have enough experience with Xcode to understand immediately, so the more explanation the better.

AFW
  • 77
  • 10

2 Answers2

1

Look at the "Run Scheme" for your Project (Product->Scheme->Edit Scheme or option-click on the Run button) and check the Build Configuration pulldown. Make sure that's Debug, not Release.

BTW, you can also tell what binary is actually getting run by running in the debugger, hit the Pause button, then in the Debugger Console, type:

(lldb) image list <AppName>

That will show the path to the binary that got loaded. If this is the Release version that should show up in the path and you'll know you are debugging the wrong configuration...

Jim Ingham
  • 25,260
  • 2
  • 55
  • 63
  • The scheme is set to Debug and the Console also reports it as "...Build/Products/Debug-iphonesimulator/...". Do you know anything else that would keep it from displaying in the debugger? For reference, I have put print() in functions that I know are being called to see whether or not it is giving output. – AFW May 06 '16 at 16:40
  • Make sure the "Generate Debug Symbols" setting in the Build settings for your project didn't somehow get switched to No. If it is not that, then try again running the app, pausing it, and issue the "break list" command, and see that that says. Also try the command "image dump line-table " and see what output that gives. – Jim Ingham May 06 '16 at 22:36
  • With the "break list" command, it reports some of the breakpoints as "resolved" while the rest are "pending". The resolved ones are from the main file, the pending ones come from the keyboard extension. With the second command, I cannot get it to give me output regarding my keyboard extension. I can get it to give output regarding my main viewController, but I don't quite understand what I am looking for, if anything. – AFW May 08 '16 at 22:20
  • I recently found other StackOverflow posts related to my question. It was a common issue with iOS 8. http://stackoverflow.com/questions/24051821/keyboardviewcontroller-nslog-ios-8 While I didn't find an answer that worked for me on StackOverflow, I was able to find a suitable solution. I will write it as the answer incase if anyone else needs the information. – AFW May 11 '16 at 16:29
0

In archiving my app, Xcode combined the scheme of the Containing App and the Keyboard extension. As a result, the Containing App was the only selection possible when choosing a scheme and the output of the Keyboard Extension was no longer sent to the debugger.

In order to solve this, I selected "Product > Scheme > New Scheme..." and then selected my Keyboard Extension to be its own Scheme again. Once the Keyboard Extension was a scheme again, it was able to be selected as the target scheme to send output to the Debugger.

AFW
  • 77
  • 10