I'm creating a pretty specific entry with some fields. And I want to create the from a third party app. For that, I'd like to see the SQL query that get executed.

I've tried it with events, entries.onBeforeSaveEntryand content.saveContent but I cannot get the query itself.


If you add the devMode setting to your config, you should then be able to view the Javascript Console in your browser to see the SQL Queries being run.

In particular you're looking for the Profiling Summary Report.

Also, you can view the Craft Logs at /admin/utils/logs, when you are logged into the Control Panel.


In addition to Steve's answer, if you install xDebug, you can put a breakpoint in craft/app/EntriesService()->saveEntry() and step through/into and watch the SQL query be built and executed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.