How to show SQLite Debug output from Core Data in iOS

Add this statement to your app’s Run Scheme

and your Log Console shall be populated with fascinating statements such as

2013-11-20 18:49:53.715 YourApp[6245:70b] CoreData: annotation: Connecting to sqlite database file at “/Users/versluis/Library/Application Support/iPhone Simulator/7.1-64/Applications/1FED9364-3039-4D47-967E-9B075CBE8277/Documents/PatchBay.sqlstore”
2013-11-20 18:49:53.717 YourApp[6245:70b] CoreData: sql: pragma journal_mode=wal
2013-11-20 18:49:53.718 YourApp[6245:70b] CoreData: sql: pragma cache_size=200
2013-11-20 18:49:53.719 YourApp[6245:70b] CoreData: sql: SELECT Z_VERSION, Z_UUID, Z_PLIST FROM Z_METADATA

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.