xdebug
How to know the xdebug version i have installed?
php -v command output includes information about installed XDebug version: $ php -v PHP 5.6.13-1+deb.sury.org~trusty+3 (cli) Copyright (c) 1997-2015 The PHP Group Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2015, by Zend Technologies with Xdebug v2.3.2, Copyright (c) 2002-2015, by Derick Rethans or $ php -v | grep … Read more
Trigger xDebug in PhpStorm when calling using CURL
The following code works for me curl -i -X POST -d ‘{“some”:”data”}’ http://your-local-domain -b XDEBUG_SESSION=PHPSTORM
How to debug php artisan serve in PHPStorm?
Debugging using php artisan serve does not work unless you have enabled debugging in ini file. @Bogdan pointed out the reason. artisan serve will call PHP Built-in Web Server but does not pass on the php command line options (named interpreter options in PHPStorm). i.e. if you execute from command line: $ php -dxdebug.remote_enable=1 -dxdebug.remote_mode=req … Read more
Debug PHP with VSCode and Docker
Managed to solve my issue with the following settings: launch.json { “version”: “0.2.0”, “configurations”: [{ “name”: “Listen for XDebug”, “type”: “php”, “request”: “launch”, “port”: 9000, “log”: true, “externalConsole”: false, “pathMappings”: { “/srv/app/cms”: “${workspaceRoot}/cms”, }, “ignore”: [ “**/vendor/**/*.php” ] }, ] } xdebug.ini zend_extension=/usr/local/lib/php/extensions/no-debug-non-zts-20160303/xdebug.so xdebug.default_enable=1 xdebug.remote_enable=1 xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.remote_connect_back=0 xdebug.remote_host=host.docker.internal xdebug.idekey=VSCODE xdebug.remote_autostart=1 xdebug.remote_log=/usr/local/etc/php/xdebug.log
What’s the difference between “extension” and “zend_extension” in php.ini?
Zend_extentions are extensions that are built into the Zend engine itself. The engine parses, interprets and executes PHP script. Changing the engine changes the way that PHP works. The included diagram will describe the main difference between an extension and a zend_extension. Both types of extensions share lots of functionality. The difference between both types … Read more
Visual Studio Code debugging Array evaluation
Thanks to Phiter’s comment, I managed to find a fix. Essentially, XDebug can be configured with various options placed inside the file php.ini. Among these options are those which specify the depth of an object to display on the GUI. However, when debugging through Visual Code’s PHP Debug (felixbecker.php-debug) extension, these settings must be configured … Read more
xdebug remote debugging won’t stop at breakpoints
I had this problem and took me ages to find the answer. In your debug config, in the server area, click Configure, go to Path Mapping, click the path that’s there and click edit, change to Path in file system and navigate to the correct file. Done.