是否可以在 php 内置 Web 服务器上使用 xdebug? [英] Is it possible to use xdebug on php built-in web server?

查看:36
本文介绍了是否可以在 php 内置 Web 服务器上使用 xdebug?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台装有 apache2 和 php7 的计算机,我将 php.ini 设置为使用 xdebug 并且没问题,我可以使用编辑器进行调试.

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.

但是我想在另一台只有 php 的电脑上调试.

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

我使用以下命令启动服务器:php -S localhost:8080

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

我尝试使用相同的php.ini,但似乎php内置的Web服务器无法理解php.ini

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

我使用的命令是:php -S localhost:8080 -c <<path to my php.ini>>

这里是apache服务器的phpinfo输出:

Here the phpinfo output from apache server:

这里是内置网络服务器的输出:

and here the output from built-in web server:

推荐答案

你需要在-S之前通过php.ini:

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

这篇关于是否可以在 php 内置 Web 服务器上使用 xdebug?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆