Console logging broken on watchOS3 beta 4, with Xcode 8 beta 4

Logging still works on simulator but not on hardware, anyone else encountering this or similar issues? Any solutions?

Accepted Reply

I've found the same. My workaround is to use printf in ObjC and print in Swift to output to the debugger console.

Replies

I am also struggling with this. Haven't found a workaround yet.

I've found the same. My workaround is to use printf in ObjC and print in Swift to output to the debugger console.

Thanks Muon... I should have thought of trying that. Great workaround

Yup seems on the Watch, NSLog is broken. 😟

If your debugger attaches (Which sometimes it wont), then print should show you output in the console.

Excellent workaround, thank you!

Yes indeed, good workaround!

I've been struggling with this for a while. I have some problems that only happen on a real device, not in the simulator, and without any logs it's almost impossible to figure out if I'm doing somethng wrong, or it's just an issue with watchOS. I figured I'd try doing a sysdiagnose, to see if that included any of my own logging. Not as useful as live logging in Xcode, but at least it'd be something! So I was looking around here: https://developer.apple.com/bug-reporting/profiles-and-logs/


If you scroll down to sysdiagnose for watchOS, there's a link to this logging profile:

http://adcdownload.apple.com/iOS/watchOS_Logs/watchOS_logging.mobileconfig


The instructions tell you to email it, but you can also just AirDrop it to your iPhone, and it will ask where you want to install it. Install it on your watch, and you will finally get logs out of it—in Xcode's console, plus a huge amount of data in the new Console app in Sierra. It streams over live with this profile installed—you don't have to do the actual sysdiagnose process.


To remove the profile, open the Watch app on your iPhone, tap General, then Profiles. Tap the profile, then "Delete Profile".

Thanks for the work-around, the issue still persists in Xcode 8 beta 6.


Apple, why does it take mutliple beta versions to fix this?