我在PhpStorm远程调试我的项目.IDE显示"已连接"片刻并立即进入"等待传入连接..."
以下是此会话的Xdebug日志
I: Connecting to configured address/port: X.x.x.x:9000.
I: Connected to client. :-)
> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///xxx/info.php" language="PHP" protocol_version="1.0" appid="4365" idekey="10594"><engine version="2.2.2"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATAhttp://xdebug.org]></url><copyright><![CDATA[Copyright (c) 2002-2013 by Derick Rethans]]></copyright></init>
<- feature_set -i 0 -n show_hidden -v 1
> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="0" feature="show_hidden" success="1"></response>
<- feature_set -i 1 -n max_depth -v 1
> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="max_depth" success="1"></response>
<- feature_set -i 2 -n max_children -v 100
> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_children" success="1"></response>
<- status -i …Run Code Online (Sandbox Code Playgroud) 我正在使用PHPstorm作为我的主要PHP开发环境和XDebug来调试我的应用程序.
我唯一的问题是消息"无法接受外部Xdebug连接:无法计算表达式'isset($ _ SERVER ['PHP_IDE_CONFIG'])'"不时出现.
我已经在这里和JetBrains支持(这里和这里)看到了一些问题的解决方案,但我的问题有点不同,因为我可以正常调试,但消息继续出现.
请参阅下面的事件日志的打印.显然,该消息每30分钟出现一次.
仅供参考,我正在对一个web服务进行调试,因此,我将Xdebug配置为侦听所有HTTP请求,单击"开始侦听PHP调试连接按钮"(图中的绿色),然后通过Advannced Rest Client(Chrome)启动请求.
正如我所说,我可以毫无问题地进行调试,所以我只想了解这条消息.它会引起任何问题吗?难道我做错了什么?我可以禁用此消息吗?怎么样?
我在链接的问题中尝试了解决方案,但消息仍然存在.
这是我的Xdebug配置:
[Zend]
zend_extension="/usr/lib/php5/20131226/xdebug.so"
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_autostart=1
xdebug.remote_connect_back=0
Run Code Online (Sandbox Code Playgroud) 我刚刚升级到PHP 7并且发现它很好而且很快,但是自从我升级(完全不变的代码)以来,我一直在得到间歇性的内部服务器错误(500).我正在记录错误,普通日志中没有任何内容,但在事件查看器中,我有成千上万的这些:
The description for Event ID 487 from source Zend OPcache cannot be found. Either the component that raises this event is not installed on your local computer or the installation is corrupted. You can install or repair the component on the local computer.
If the event originated on another computer, the display information had to be saved with the event.
The following information was included with the event:
Base address marks unusable memory region. Please setup opcache.file_cache and …Run Code Online (Sandbox Code Playgroud) 我在使用 Codeception 在 PhpStorm 中为我的应用程序运行测试时出错。我的代码正在通过 Vagrant 运行。
在我的用于 Codeception 测试的index.php的第一行是:
ini_set('xdebug.max_nesting_level', 200);
Run Code Online (Sandbox Code Playgroud)
我通过自制软件安装了 xdebug,这在我的 php 版本输出中:
PHP 7.1.12 (cli) (built: Dec 2 2017 12:15:25) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
with Xdebug v2.5.5, Copyright (c) 2002-2017, by Derick Rethans
Run Code Online (Sandbox Code Playgroud)
当我运行测试时,虽然我在 PhpStorm 事件日志中收到错误:
Cannot accept external Xdebug connection: Cannot evaluate expression 'isset($_SERVER['PHP_IDE_CONFIG'])'
Run Code Online (Sandbox Code Playgroud)
在我的 PhpStorm 设置中,我将其设置为接受外部连接:
在 php info 我有可用的 xdebug 设置:
$ php -i | grep xdebug
Additional …Run Code Online (Sandbox Code Playgroud)