7 Replies
      Latest reply: Nov 8, 2016 1:20 AM by eskimo RSS
      pjmurphy Level 1 Level 1 (0 points)

        I'm printing out objects in the console window, these are NSMutableArrays with define objects in them using a defined description print statement.

        These objects use to always print out fine, although some of them might  be large, and now the console window just stops printing them for some reason. If I halt Xcode and issue a >po object

        It prints out the object fine, but the NSLog's will not printout the very same object correctly.

        Something is really amiss here...

        This Xcode 8 release is the all time worse I've seen, with all the Interface builder issues, Apple really needs to fix all these problems ASAP or nobody is going to be shipping iOS10 apps.

         

        Anyone else experiencing this?

        • Re: Xcode console not printing out correctly
          eskimo Apple Staff Apple Staff (6,075 points)

          Some questions:

          • What version of macOS are you running Xcode 8 on?

          • What platform is the app you’re debugging running on?

          • What OS version?

          • If it’s not on a Mac, is that in the simulator or on a real device?

          Share and Enjoy

          Quinn “The Eskimo!”
          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
          let myEmail = "eskimo" + "1" + "@apple.com"

            • Re: Xcode console not printing out correctly
              carnoc Level 1 Level 1 (0 points)

              I'm the same question.

              EI Capitan 10.11.6

              xcode8

              iphone6 & ios10

              and the simulator is ok.but the simulator show many garbage infomations.

               

              Need help!!!

                • Re: Xcode console not printing out correctly
                  eskimo Apple Staff Apple Staff (6,075 points)

                  but the simulator show many garbage infomations.

                  Hmmm.  Is your particular concern the log spew visible in the simulator?  That’s a well-known issue covered by another thread.

                  This thread is about log entry truncation, which is quite a different issue.

                  Share and Enjoy

                  Quinn “The Eskimo!”
                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                  let myEmail = "eskimo" + "1" + "@apple.com"

                    • Re: Xcode console not printing out correctly
                      brett_stuart Level 1 Level 1 (0 points)

                      Same problem here, worked perfect when I used NSLog for large outputs, since the xCode 8 and iOS 10 update it only prints out 1024 chars it seems.

                      Is there anything we can do to fix?

                       

                      iPhone 5 iOS10

                      El Capitan 10.11.6

                      xCode 8.0

                        • Re: Xcode console not printing out correctly
                          eskimo Apple Staff Apple Staff (6,075 points)

                          I believe this is fallout from the new logging infrastructure (see WWDC 2016 Session 721 Unified Logging and Activity Tracing).  It was designed to be always enabled, so it needs hard limits on the size of log entries.  This is documented in the header docs in <os/log.h>; search for the phrase physical cap for details.

                          There’s lots of potential ways around this.  The best approach depends on your specific requirements.  For example:

                          • If you need to log this amount of data in an app you ship to customers, you should probably look at a custom logging solution.

                          • If you’re just logging during debugging, you might be better off using an breakpoint log action in Xcode.

                          Share and Enjoy

                          Quinn “The Eskimo!”
                          Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                          let myEmail = "eskimo" + "1" + "@apple.com"

                            • Re: Xcode console not printing out correctly
                              JoeSzymanski Level 1 Level 1 (0 points)

                              Do you have any ideas on how we could move forward with this to support our testing team? We regularly test pre-built verison of the application, and debugging the responses that come from our API servers is critical, since we need to know if the bugs are because of data being returned from the API or if the app is doing something wrong. Doing this via NSLog was our standard process, since it doesn't require third-party tools in any way and is specific to the device and app being tested.

                               

                              We can't easily do breakpoint logging because the apps are pre-built, and custom logging solutions look like they would add significant complication to the testing process.

                               

                              I'm at a loss for how to help our testing team move forward with testing anything on iOS 10 because of this.

                                • Re: Xcode console not printing out correctly
                                  eskimo Apple Staff Apple Staff (6,075 points)

                                  Can you share more details about your testing workflow?  Historically NSLog was less than ideal for this sort of thing because:

                                  • Its output goes to the system log which, prior to iOS 10, was non-persistent and only held 256 entries (unless you had Xcode or Apple Configurator attached, in which case the log entries were snarfed by those tools).

                                  • To capture all of your log entries you have to hook the device up via USB, and that actually affects the behaviour of the device as a whole (it’s on mains power, and there’s a bunch of places where iOS behaves differently on mains power).

                                  However, you obviously found a workflow that works for you.  Did your testers test the app with Xcode attached?  If not, how did you get these logs off the device on iOS 9?

                                  Share and Enjoy

                                  Quinn “The Eskimo!”
                                  Apple Developer Relations, Developer Technical Support, Core OS/Hardware
                                  let myEmail = "eskimo" + "1" + "@apple.com"