

Zend Engine v4.0.0-dev, Copyright (c) Zend Technologies If Xdebug is installed, this command will output something like: PHP 8.0.0 (cli) (built: 13:51:52) ( NTS ) You can check this by either putting a phpinfo() statement into a Kirby template or into a separate file and look for the xdebug section, or open a terminal and type php -v Let's first check if Xdebug is already installed on your system. In some development environments like MAMP Pro, Xdebug comes bundled, so you don't have to install it separately. This recipe was tested on Mac OS Big Sur and Ubuntu 20.04 with Laravel Valet and Valet Linux, respectively. In this recipe we will focus on Step Debugging with Xdebug. With Xdebug, you can break code execution at any point, follow code execution step by step right from the beginning, and inspect all variables during a request. This is where Xdebug comes in, a PHP extension that provides debugging and profiling capabilities, which will finally speed up your development process, help you write better code and facilitate refactoring. While these functions are usually helpful for taking a quick look at the output of your variables, they are not useful for evaluating these variables at runtime, analyzing stack traces or setting breakpoints. In our Basic error hunting & prevention recipe, we introduced some functions like var_dump(), print_r() or error_log() to help debug your variables in PHP.
