【发布时间】:2017-07-23 18:31:06
【问题描述】:
在有人抱怨之前,这是一个重复的问题,我的设置:
在 Linux 和 PHP 7 上运行 VirtualBox 的 OS X。
我正在尝试从 Eclipse 迁移到 PhpStorm。调试工作完全符合 Eclipse 的要求,但是我似乎无法使用 PhpStorm 运行它。
PHP 初始化:
[xdebug]
# see http://stackoverflow.com/questions/42656135/xdebug-breakpoint-fail for settings
zend_extension=/usr/lib/php/20151012/xdebug.so
xdebug.remote_enable=true
xdebug.remote_host=192.168.56.1
xdebug.remote_port=10000#port 9000 is usually occupied by FPM, so I recommend to use a different
xdebug.remote_autostart=1
xdebug.idekey=
在尝试进行各种更改时,它会报告以下内容:
18:40 PHP Interpreter is not configured: Please configure PHP Interpreter to use built-in web server
18:54 Can't start listening for connections from 'xdebug': Port 9000 is busy
18:54 Can't start listening for connections from 'Zend Debugger': Port 10137 is busy
18:54 Cannot start 'Zend Debugger Settings Broadcasting': Port 20080 is busy
18:54 Can't start listening for connections from 'xdebug': Port 9000 is busy
18:54 Can't start listening for connections from 'Zend Debugger': Port 10137 is busy
18:54 Cannot start 'Zend Debugger Settings Broadcasting': Port 20080 is busy
18:57 Can't start listening for connections from 'xdebug': Port 9000 is busy
18:57 Can't start listening for connections from 'Zend Debugger': Port 10137 is busy
18:57 Cannot start 'Zend Debugger Settings Broadcasting': Port 20080 is busy
18:58 Can't start listening for connections from 'xdebug': Port 9000 is busy
18:58 Can't start listening for connections from 'Zend Debugger': Port 10137 is busy
18:58 Cannot start 'Zend Debugger Settings Broadcasting': Port 20080 is busy
18:58 Can't start listening for connections from 'xdebug': Port 9000 is busy
18:58 Can't start listening for connections from 'Zend Debugger': Port 10137 is busy
18:58 Cannot start 'Zend Debugger Settings Broadcasting': Port 20080 is busy
【问题讨论】:
-
1) 那么.. 究竟是什么不起作用(IDE 向您显示什么错误/消息)? 2)你的设置/IDE配置是什么? 3)以防万一:confluence.jetbrains.com/display/PhpStorm/…
-
好点 LazyOne,已编辑以显示消息
-
所以..您没有在这些消息中看到任何错误?像 "Can't start listener for connections from 'xdebug': Port 9000 is busy" ?.. 提示:1) 您已将 xdebug (php.ini) 配置为使用端口
10000但 IDE仍在尝试侦听9000端口...您是否更改了 PhpStorm 设置中的 xdebug 端口? 2) "Port 9000 is busy" -- 该端口已经被其他服务(可能是您的 php-fmp)监听了......所以 IDE 显然无法监听那个已经在使用的端口。附:不要一次运行多个 IDE(以防它们同时运行) -
LazyOne ...我发现您的回答对并发进程既有帮助又有帮助,哈哈!!!!当然有突出显示的错误 - 这就是我要问的。基本上,我怎样才能让 PHPStorm 在给定的非本地服务器/IP 和端口上使用 xdebug(即在给定主机定义或 IP 的 VM 上)。 IDE 似乎忽略了我设置的所有内容,因此删除了设置,重新启动了 VM 和主机等
-
回答这个问题.. 我需要查看您的 IDE 设置。 1) 现在(根据您目前提供的信息)我只能说您需要在 IDE 设置中设置 xdebug 端口以匹配您在 php.ini 中设置的端口。如果不知道您在那里设置了什么,我无法给您任何更好的建议。 2) IDE 也无法监听 Zend Debugger 端口的事实......可能表明本地防火墙的一般问题..或其他已经在这些端口上监听的应用程序(我的第一印象,考虑到所有端口都很忙,是你也运行了 Eclipse)。