PhpStorm | WebMatrix (IISExpress) | Xdebug.remote_port | — Which Port(s) to put where?

喜夏-厌秋 提交于 2019-12-11 09:17:54

问题


I've got a localhost webserver setup with WebMatrix and its IISExpress. It runs the webserver as http://localhost:<port>.
I've also installed xdebug in it which runs perfectly for error-handling purposes.

Now I have installed PhpStorm and I want to make use of its debugger's break-point wizardry. It uses Xdebug's /?XDEBUG_SESSION_START=<IDEKEY> feature and This is where I'm having trouble.

In all, I have 3 places where I can set PORT:

  • (a) Port in xdebug.remote_port in php.ini.

  • (b) Port in WebMatrix.

  • (c) Port in PhpStorm's Server settings, in Run/Debug configuration

EDIT: There's an error here:

All those extra "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?


回答1:


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.



来源:https://stackoverflow.com/questions/17130931/phpstorm-webmatrix-iisexpress-xdebug-remote-port-which-ports-to-put

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!