Debugging Core Data

You can enable debugging core data to log the actual SQL sent to SQLite. This information can be useful to find some performance problems.

Debugging Core Data

Go to Product > Edit Scheme (or press ⌘ + <).

Debugging Core Data - Xcode Scheme Menu
Xcode Scheme Menu

Then go to the main panel’s ‘arguments’ Tab, and add -com.apple.CoreData.SQLDebug 1

Debugging Core Data - XCode Edit Scheme
XCode Edit Scheme

Press OK and your are all set.

Now, all core data operations will appear in console

About the author

Daniel Passos

Open source addicted, geek, teacher, traveler, Android and iOS freak. Android Tech Leader at Red Hat and Dj in spare time

By Daniel Passos

Categories

Tags