xdebug断点失败 [英] xdebug breakpoint fail

查看:134
本文介绍了xdebug断点失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以通常的方式庆祝新的测试服务器的安装-通过寻求帮助使xdebug正常工作.

Celebrating setting up a new test server box in the usual way - by asking for help getting xdebug to work.

服务器: Ubuntu Server 16.10/Nginx/PHP 7 Xdebug设置,其要求如下所述: http://php-built.com/installing-xdebug- for-php7/并显示在phpinfo

Server: Ubuntu Server 16.10 / Nginx / PHP 7 Xdebug setup with requirements as at http://php-built.com/installing-xdebug-for-php7/ and showing on phpinfo

i **:

这些是当前尝试的设置

[xdebug]
zend_extension="/usr/lib/php/20151012/xdebug.so"
xdebug.remote_enable=true
xdebug.remote_host=192.168.0.201
xdebug.remote_port=10000 (port #9000 is usually occupied by FPM, so I recommend to use a differen$
xdebug.remote_autostart=1
xdebug.idekey=netbeans-xdebug

客户: Windows 10/Netbeans在端口10000上侦听

Client: Windows 10 / Netbeans listening on port 10000

日志:

Log opened at 2017-03-15 17:23:49
I: Connecting to configured address/port: 192.168.0.201:10000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/usr-datadimension/datadimension/sitefiles/public/index.php" language="PHP" xdebug:language_version="7.0.15-0ubuntu0.16.10.4" protocol_version="1.0" appid="19891" idekey="netbeans-xdebug"><engine version="2.5.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2017 by Derick Rethans]]></copyright></init>

<- feature_set -i 28 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="28" feature="show_hidden" success="1"></response>

<- feature_set -i 29 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="29" feature="max_depth" success="1"></response>

<- feature_set -i 30 -n max_children -v 30
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="30" feature="max_children" success="1"></response>

<- feature_set -i 31 -n max_data -v 2048
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="31" feature="max_data" success="1"></response>

<- breakpoint_set -i 32 -t line -s enabled -f file://TESTSERVERSHARE/sitefiles/app/ControllerLibrary/Controllers/RootController_c.php -n 31
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="32" state="enabled" id="198910001"></response>

<- run -i 34
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="34" status="stopping" reason="ok"></response>

Log closed at 2017-03-15 17:23:50

我已经根据以下一些有用的注释对此进行了编辑,但是他们没有提供解决方案,尽管我可以看到xdebug指出日志中存在连接.

I have edited this according to some helpful comments below but they have not provided the solution though I can see xdebug stating there is a connection in the logs.

有趣的是,当我选择在第一行停止"时,继续"图标显示为绿色,执行似乎停止了,尽管我不知道在哪里.断点仍然被忽略,因此Netbeans似乎在部分地识别xdebug. 这同时使用了Chrome和Firefox.

Interestingly when I select 'stop at first line' the 'Continue' icon shows green and execution appears to stop, though I have no idea where. Breakpoints are still ignored so it appears Netbeans is identifying xdebug partly. This is using both the Chrome and Firefox.

请使xdebug和netbeans对话时需要帮助.

Help required please for getting xdebug and netbeans to talk.

推荐答案

我以前从未在Netbeans上进行过设置,但是从Eclipse上类似的报告问题来看,似乎此设置要求将Project properties > Source > Web Root设置为Nginx服务的公共目录. 断点现在可以正常工作.

I've never had to set this on Netbeans before but from looking at similar reported issues on Eclipse it appears that this setup requires Project properties > Source > Web Root to be set to the public directory served by Nginx. The breakpoints are now working properly.

这篇关于xdebug断点失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆