Xcode 4 and Core Data: How to enable SQL Debugging

You should be looking at the same place you get NSLOGS

And you should Go to Product -> Edit Scheme -> Then from the left panel select Run YOURAPP.app and go to the main panel’s Arguments Tab.

There you can add an Argument Passed On Launch.

You should add -com.apple.CoreData.SQLDebug 4 (number between 1 and 4, higher number makes it more verbose)

Press OK and your are all set.

The key here is to edit the scheme you will be using for testing.

Leave a Comment