Home > Software engineering >  How to debug Laravel application using PhpStorm
How to debug Laravel application using PhpStorm

Time:02-25

I'm developing a Laravel 8.6 application using PHP 8.1 with Xdebug extension but I can't get the PhpStorm's debugging tool to work.

Here's my debug configuration. Notice that I'm using a virtual host

enter image description here

PhpStorm's is listening for PHP debug connections and I set a breakpoint to an endpoint but when I make the http request via Postman nothing happens. What am I doing wrong?

php.ini

zend_extension=C:\xampp\php\ext\php_xdebug.dll
xdebug.mode=debug
xdebug.remote_enable = 1
xdebug.remote_host = "api-fitplanner.localhost"
xdebug.remote_autostart=on
xdebug.remote_enable=on
xdebug.remote_port=9003

CodePudding user response:

You are using Xdebug 2 settings, but you are running Xdebug 3.1.3. Please refer to the upgrade guide on how to convert these.

From what you wrote above, it should be:

zend_extension=C:\xampp\php\ext\php_xdebug.dll
xdebug.mode=develop,debug
xdebug.client_host="api-fitplanner.localhost"
xdebug.start_with_request=yes

  • Related