Hello, I rummaged through many sources and manuals, but did not find the xdebug setting, when we start the server, for example, via

php -S localhost:8888 

I configured in php.ini

 zend_extension = C:\php\ext\php_xdebug-2.6.0-7.2-vc15-x86_64.dll xdebug.remote_enable=On xdebug.remote_host=«localhost» xdebug.remote_port=8888 xdebug.remote_handler=«dbgp» 

phpinfo () indicates that xdebug is configured and ready to use. enter image description here

set up a server through PhpStorm enter image description here enter image description here

I turn on the audition, put the red dot on the right moment and turn on the debugger through the server enter image description here

But it gives this: enter image description here

Through the same port a web application is launched on the local server.

How to save and get a normal debug?

  • Why such a perversion? This is not a full-fledged web server - Yaroslav Molchan
  • @YaroslavMolchan Well, I would like to debug on my local server. - Anatoliy.CHA
  • There are many options: xammp, iis, openserver in case of emergency if we are talking about windows. - Yaroslav Molchan

1 answer 1

I offer a simple way to configure:

  1. Create server in phpstorm settings
  2. In the Run / Debug Configuration setup we create a new PHP Remote Debug configuration.
  3. We indicate in it the name of our server and ide key (session id) = PHPSTORM
  4. Download add-on for your browser "Xdebug helper"
  5. After installation, right click on its icon, go to settings and set IDE key = PHPSTORM, save
  6. In phpstorm we find the bug icon, it can be used to enable debugger
  7. Open the local web page you need. Left click on the Xdebug helper icon and turn it on by pressing the DEBUG button

Hope this was helpful to you.