Is it possible to use xdebug on php built-in web server?

5.9k Views Asked by At

I have a computer with apache2 and php7, I setup the php.ini to use xdebug and its ok, I can debug using an editor.

But I want to debug in another computer that has only php.

I started the server using: php -S localhost:8080

I tried to use the same php.ini, but it seems that php built-in web server can't understant the php.ini

I used the command: php -S localhost:8080 -c <<path to my php.ini>>

Here the phpinfo output from apache server:

enter image description here

and here the output from built-in web server:

enter image description here

1

There are 1 best solutions below

0
On

You need to pass php.ini before -S:

php -c /path/to/php.ini -S localhost:8080