
ini file for Xdebug, you will work with this file, otherwise, use the main. With phpinfo(), you find the information at the top of the output in the fields ini file, sometimes there is one for each loaded extension.

Here again, you can either find the paths to all used files via phpinfo() or via the CLI. The first step to configure Xdebug is to find the. Once Xdebug is installed, we have to set some configuration settings. There's also a wizard where you can enter the output of your phpinfo() to get instructions to build Xdebug from source for your environment. You can find the installation instructions for your platform in the official Xdebug documentation.

With Zend OPcache v8.0.0, Copyright (c), by Zend Technologies Installation instructions With Xdebug v3.0.1, Copyright (c) 2002-2020, by Derick Rethans 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.
