Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to debug Laravel application using PhpStorm

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

>Solution :

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

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading