PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Saturday, February 26, 2022

[FIXED] How to debug Laravel application using PhpStorm

 February 26, 2022     debugging, laravel, php, phpstorm, xdebug     No comments   

Issue

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

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



Answered By - Derick
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing