1- **************************
1+ ##########################
22Debugging Your Application
3- **************************
3+ ##########################
44
55.. contents ::
66 :local:
77 :depth: 2
88
9- ================
10- Replace var_dump
11- ================
9+ *************
10+ Checking Logs
11+ *************
1212
13- While using XDebug and a good IDE can be indispensable to debug your application, sometimes a quick ``var_dump() `` is
14- all you need. CodeIgniter makes that even better by bundling in the excellent `Kint <https://kint-php.github.io/kint/ >`_
15- debugging tool for PHP. This goes way beyond your usual tool, providing many alternate pieces of data, like formatting
16- timestamps into recognizable dates, showing you hexcodes as colors, display array data like a table for easy reading,
17- and much, much more.
13+ .. _codeigniter-error-logs :
14+
15+ CodeIgniter Error Logs
16+ ======================
17+
18+ CodeIgniter logs error messages, according to the settings in **app/Config/Logger.php **.
19+
20+ The default configuration has daily log files stored in **writable/logs **.
21+ It would be a good idea to check them if things aren't working the way you expect!
22+
23+ You can adjust the error threshold to see more or fewer messages. See
24+ :ref: `Logging <logging-configuration >` for details.
25+
26+ Logging All SQL Queries
27+ =======================
28+
29+ All SQL queries issued by CodeIgniter can be logged.
30+ See :ref: `Database Events <database-events-dbquery >` for details.
31+
32+ ********************
33+ Replacing var_dump()
34+ ********************
35+
36+ While using Xdebug and a good IDE can be indispensable to debug your application,
37+ sometimes a quick ``var_dump() `` is all you need. CodeIgniter makes that even
38+ better by bundling in the excellent `Kint <https://kint-php.github.io/kint/ >`_
39+ debugging tool for PHP.
40+
41+ This goes way beyond your usual tool, providing many alternate pieces of data,
42+ like formatting timestamps into recognizable dates, showing you hexcodes as colors,
43+ display array data like a table for easy reading, and much, much more.
1844
1945Enabling Kint
2046=============
@@ -33,6 +59,7 @@ The ``d()`` method dumps all of the data it knows about the contents passed as t
3359allows the script to continue executing:
3460
3561.. literalinclude :: debugging/001.php
62+ :lines: 2-
3663
3764dd()
3865----
@@ -45,14 +72,15 @@ trace()
4572This provides a backtrace to the current execution point, with Kint's own unique spin:
4673
4774.. literalinclude :: debugging/002.php
75+ :lines: 2-
4876
4977For more information, see `Kint's page <https://kint-php.github.io/kint// >`_.
5078
5179.. _the-debug-toolbar :
5280
53- =================
81+ *****************
5482The Debug Toolbar
55- =================
83+ *****************
5684
5785The Debug Toolbar provides at-a-glance information about the current page request, including benchmark results,
5886queries you have run, request and response data, and more. This can all prove very useful during development
0 commit comments