<p>If you add the <a href="https://craftcms.com/docs/config-settings#devMode" rel="nofollow noreferrer">devMode</a> setting to your config, you should then be able to view the Javascript Console in your browser to see the SQL Queries being run.</p>

<p>In particular you're looking for the <code>Profiling Summary Report</code>.</p>

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

CC BY-SA 3.0
2017-03-24T10:27:01.473Z
2017-03-24T10:27:01.473Z
Steve Holland
<p>In addition to <a href="https://craftcms.stackexchange.com/a/19610/57">Steve's answer</a>, if you install <a href="https://xdebug.org" rel="nofollow noreferrer">xDebug</a>, you can put a breakpoint in <code>craft/app/EntriesService()-&gt;saveEntry()</code> and step through/into and watch the SQL query be built and executed.</p>

CC BY-SA 3.0
2017-03-24T18:26:59.700Z
2017-03-24T18:26:59.700Z
2017-04-13T12:51:00.200Z
Brad Bell
<p>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.</p>

<p>I've tried it with events, <code>entries.onBeforeSaveEntry</code>and <code>content.saveContent</code> but I cannot get the query itself.</p>

<plugin-development><entries><mysql>
See the SQL query that gets executed when saving entry
# See the SQL query that gets executed when saving entry

(Asked by: username_0 on 2017-03-24)

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.onBeforeSaveEntry`and `content.saveContent` but I cannot get the query itself.

**Tags:** plugin-development, entries, mysql


---

## 2 answers

### Answer by username_1 on 2017-03-24. Score: 3

If you add the [devMode](https://craftcms.com/docs/config-settings#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.


---

### Answer by username_2 on 2017-03-24. Score: 0

In addition to [Steve's answer](https://craftcms.stackexchange.com/a/19610/57), if you install [xDebug](https://xdebug.org), you can put a breakpoint in `craft/app/EntriesService()->saveEntry()` and step through/into and watch the SQL query be built and executed.


---

