在我的任何PhpStorm项目中,调试都不再起作用,当我开始侦听传入的连接时,脚本将被阻塞,直到我停止侦听连接,即使我的代码上没有断点也是如此。当我在第一行上放置一个断点(在其他行上不起作用)时,脚本确实停止了,但是当我告诉他转到下一行时,它再次阻塞了(即使使用了最简单的代码)。
我试图检查调试配置,一切正常(我使用了PhpStorm的验证器),路径映射也正常,上周一切正常,我什么都没改变...
这是我在php.ini上的配置:
xdebug.remote_autostart=1
xdebug.remote_enable=1
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=127.0.0.1
xdebug.remote_port=9000
xdebug.remote_log=[path]/xdebug.log
xdebug.idekey=PHPSTORM
Run Code Online (Sandbox Code Playgroud)
这是我的xdebug.log的一部分,当我在第一行上放置断点然后执行以下操作时:
[4605] Log opened at 2019-03-12 14:13:50
[4605] I: Connecting to configured address/port: 127.0.0.1:9000.
[4605] I: Connected to client. :-)
[...]
[4605] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="19" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" [...] </property></response>
[...]
[4605] <- step_over -i 21
[4605] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_over" transaction_id="21" status="break" reason="ok"><xdebug:message filename="file:///[path]" lineno="4"></xdebug:message></response>
[4605]
Run Code Online (Sandbox Code Playgroud)
第一个响应是当它在第一行的断点处停止时,我已使用“ $ _COOKIE”记录了变量,一切正常,然后执行了一步,脚本就像卡住了。而且问题不可能出在代码中,我尝试了只有2个“ echo”的脚本。我尝试重新启动apache,尝试重新启动PhpStorm,然后尝试重新启动计算机,但没有做任何更改。
我的PhpStorm版本:
PhpStorm 2018.1
Build #PS-181.4203.565, built on March 28, 2018
JRE: 1.8.0_152-release-1136-b20 amd64 …Run Code Online (Sandbox Code Playgroud)