When debugging in Bolt, often you'll need to adjust settings in your
Ensure you have debugging enabled:
debug: true is
set, some internal data can be visible during debugging. You should therefore
use caution with enabling debugging in a production environment.
Setting debug error level¶
It is also advised to set the debug error level to show all errors:
Enabling debug logging¶
Enabling the debug log writes the default application logger's messages to
debuglog: enabled: true
Note: This file's size can grow quickly.
Enabling debugging while logged off¶
If you're debugging problems on a development server, and are missing a login token, the debug bar, and dumping functions will not appear.
debug_show_loggedoff will enable the debug bar, and dump output
Warning: This should only be enabled in non-production environments.
When writing and debugging Twig templates in Bolt, enable
app/config/config.yml file, making Twig be strict on the use of
Of course the debug bar has profiling information available when hovering over the Twig profiler icon, or a listing of templates used, and a render call graph that can be useful to track down templates that are causing slow page rendering.
The debug bar provides comprehensive information on:
- Performance breakdown of the request/response cycle
- Request & response object data
- Exceptions & related trace data
- Event dispatcher listeners that were, and were not, called
- Database queries that were performed for the page load
Also of worthy note, PhpStorm has the Silex Pimple plugin
available, that makes getting PHPDoc information, code completion, and method
parameter checking all work for keys on