views:

1029

answers:

3

According to Apple documentation on debugging Core Data it says we should be able to pass an argument to the application which will output the SQL core data sends to SQLite.

I have gone into the arguments tab of my executable in XCode and specified the argument:

-com.apple.CoreData.SQLDebug 1

However, I see no SQL in the console. I then tried to use this parameter in the CoreDataBooks application provided by Apple just in case there was some other issue in MY program.

Even in Apple's example I get no SQL output in the console.

Am I doing something wrong? Is Apple's documentation wrong? Should I be looking someplace other than the console? Has anyone else had success with this argument?

A: 

Are you entering those as a single argument? It should be 2 arguments: "-com.apple.CoreData.SQLDebug" and "1".

More Info: You're actually overriding a "default" here. Take a look at the Apple Docs on argument-based defaults for more information. You'll see that the name and value are 2 separate arguments.

Jesse Rusak
Jesse, even if I make these two separate arguments I still get no extra output in the console.
radesix
+1  A: 

I too banged my head against this for a while. Turns out SQLDebug with Core Data is not supported on iPhone yet. It is tracked by Apple bug ID 6868205.

dralthiace
+4  A: 

I think you will find the answer in the following link:

http://useyourloaf.com/blog/2010/3/11/debugging-core-data-on-the-iphone.html

Cheers :)

David Faitelson
He's right - it is supported on the iPhone, just with an unexpected setup.
Kris Jenkins