How do I get the CoreData Debug argument to output to the console?

后端 未结 3 449
情深已故
情深已故 2020-12-01 06:18

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.

相关标签:
3条回答
  • 2020-12-01 06:48

    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.

    0 讨论(0)
  • 2020-12-01 06:51

    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.

    0 讨论(0)
  • 2020-12-01 06:56

    XCode 4 (final) seems to be inconsistent.

    Using one argument works on the device, but fails in the simulator:

    -com.apple.CoreData.SQLDebug 1

    Using two arguments works on the device and in the simulator:

    -com.apple.CoreData.SQLDebug

    1

    0 讨论(0)
提交回复
热议问题