Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 795
danilo Avatar asked Nov 26 '17 02:11

danilo


1 Answers

You need to pass php.ini before -S:

php -c /path/to/php.ini -S localhost:8080
like image 162
Alexar Avatar answered Sep 30 '22 04:09

Alexar