PhpStorm | WebMatrix(IISExpress)| Xdebug.remote_port | -将哪个端口放到哪里? [英] PhpStorm | WebMatrix (IISExpress) | Xdebug.remote_port | -- Which Port(s) to put where?
问题描述
我已经使用WebMatrix及其IISExpress设置了本地主机Web服务器.它以http://localhost:<port>
的身份运行Web服务器.
我还安装了xdebug,它可以完美地用于错误处理.
现在,我已经安装了PhpStorm,并且想利用其调试器的断点向导.它使用Xdebug的/?XDEBUG_SESSION_START=<IDEKEY>
功能,这就是我遇到问题的地方.
总共有3个可以设置端口的地方:
-
(a)
php.ini
中xdebug.remote_port
中的端口. -
(b)WebMatrix中的端口.
-
(c)PhpStorm的
Server settings
中的端口,在Run/Debug configuration
中
编辑:此处存在错误: 所有这些额外的
"
引号"
和;
分号;
.
到目前为止,我一直在得出一个结论,即这三个不能完全相同.否则会出现错误...
在哪个端口使用哪个端口?
xdebug.remote_port
用于调试器连接,它必须不同于用于在浏览器中访问页面的HTTP Web端口.>
xdebug.remote_port 必须与此处指定的相同:
HTTP端口(大多数服务器的默认端口为80,但在测试时可以为8080或您在网络服务器设置中配置的任何端口):
您可能会发现使用quotes"
and ;
colons;
.
So far messing around, I've come to the conclusion that all three cannot be the same. otherwise it gives errors...
Which port to use where?
xdebug.remote_port
is used for the debugger connection, it must be different from the HTTP web port that you are using to access the page in a browser.
xdebug.remote_port needs to be the same as specified here:
HTTP port (80 is the default for most servers, but when testing it could be 8080 or whatever you have configured in your web server settings) is configured here:
You may find it easier to use Zero Debug Configuration instead of using PHP Application Run/Debug configuration.
这篇关于PhpStorm | WebMatrix(IISExpress)| Xdebug.remote_port | -将哪个端口放到哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!