File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ you've removed it and want to re-install it, you can do so by running the
2020following from your application's ROOT directory (where composer.json file is
2121located)::
2222
23- php composer.phar require --dev cakephp/debug_kit "~4 .0"
23+ php composer.phar require --dev cakephp/debug_kit "~5 .0"
2424
2525Then, you need to enable the plugin by executing the following line::
2626
@@ -316,3 +316,20 @@ Helper Functions
316316
317317* ``sql() `` Dumps out the SQL from an ORM query.
318318* ``sqld() `` Dumps out the SQL from an ORM query, and exits.
319+
320+ Tracing query execution
321+ =======================
322+
323+ Sometimes you need to know where specific queries are being executed in your app.
324+ To get this kind of information you can add the ``SqlTraceTrait `` to your Table class like so::
325+
326+ use DebugKit\Model\Table\SqlTraceTrait;
327+
328+ class CategoriesTable extends Table
329+ {
330+ use SqlTraceTrait;
331+ }
332+
333+ This will add the following information to the SQL log::
334+
335+ /* APP/Controller/CategoriesController.php (line 20) *)
You can’t perform that action at this time.
0 commit comments