Core Data debugging with Xcode 8

It seems that Core Data debugging by setting the launch argument

-com.apple.CoreData.SQLDebug 1

(as documented in "TroubleShooting Core Data" in the "Core Data Programming Guide") no longer works with Xcode 8.


I tried it with a new iOS Master-Detail Core Data application, running in the iOS Simulator and could not see any SQL statements in the debugger console. Did the option change, do I have to look somewhere else for the ouput? I could not find anything related in the Xcode 8 Release Notes.


Thanks for any help,

Regards, Martin

Answered by eddiekim in 180779022

> Core Data has adopted the new logging infrastructure in 10.12 and iOS 10.0, and switched from using

NSLog
to
os_log...


https://developer.apple.com/library/content/releasenotes/General/WhatNewCoreData2016/ReleaseNotes.html


You can set "-com.apple.CoreData.Logging.stderr 1" as a launch argument to get it back into the Xcode debug console.

Accepted Answer

> Core Data has adopted the new logging infrastructure in 10.12 and iOS 10.0, and switched from using

NSLog
to
os_log...


https://developer.apple.com/library/content/releasenotes/General/WhatNewCoreData2016/ReleaseNotes.html


You can set "-com.apple.CoreData.Logging.stderr 1" as a launch argument to get it back into the Xcode debug console.

Thank you! And I should have read the Core Data release notes ...

Thank you!

That really helped me out.

Core Data debugging with Xcode 8
 
 
Q