I have followed multiple guides, but it seems none of them provide correct solution and most of them are outdated. XDebug is not working.
Environment: Ubuntu 22.04, PHP 8.1, Laravel 10.
I have working laravel installation, that I develop with:
php artisan serve
I've installed XDebug PHP extension:
sudo apt install php-xdebug
Configuration file seems to be at /etc/php/8.1/mods-available/xdebug.ini
.
I have installed XDebug VSCode plugin and I have created launch.json
with default content in VSCode.
{"version": "0.2.0","configurations": [ {"name": "Listen for Xdebug","type": "php","request": "launch","port": 9003 }, ]}
What changes I need to make changes to launch.json
or xdebug.ini
to enable XDebug "step debugging"?
Edit: Xdebug started working after I set xdebug.mode = debug
and xdebug.start_with_request = yes
in xdebug.ini
.
After changes my /etc/php/8.1/mods-available/xdebug.ini
content was:
zend_extension=xdebug.soxdebug.mode = debugxdebug.start_with_request = yes