【发布时间】:2016-06-30 20:47:08
【问题描述】:
我使用标题中的设置来处理 Wordpress 多站点。我在本地服务器上运行网站,并且分别安装了 apache、php 和 mysql。它的设置方式是我使用 url 访问网站(对 hosts 文件和 php 配置的一些修改)。我在另一台使用 xampp 的虚拟机上进行了类似的设置,并且运行良好。 我的项目设置为从 index.php 文件开始,因此当我启动调试会话时,它仅在此文件中遇到断点并且只有一次。当我重新加载页面时,断点被忽略。如果我在项目属性-> 运行配置中分配一个不同的页面作为索引文件,同样的事情会发生;断点只在启动时被击中一次。我检查了 xdebug.log 中的断点路径与文件的实际路径完全相同。另外,我尝试调用 xdebug_break(),但没有成功。网站文件夹的权限设置为每个人都可以读写。
我的 xdebug 设置
zend_extension = /usr/lib64/php/modules/xdebug.so
[xdebug]
debug]
; Remote settings
xdebug.remote_autostart=off
xdebug.remote_enable=on
xdebug.remote_handler=dbgp
xdebug.remote_mode=req
xdebug.remote_host=localhost
xdebug.remote_port=9000
; General
xdebug.auto_trace=off
xdebug.collect_includes=on
xdebug.collect_params=off
xdebug.collect_return=off
xdebug.default_enable=on
xdebug.extended_info=1
xdebug.manual_url=http://www.php.net
xdebug.show_local_vars=0
xdebug.show_mem_delta=0
xdebug.max_nesting_level=100
xdebug.remote_log="/tmp/xdebug.log"
;xdebug.idekey=
; Trace options
xdebug.trace_format=0
xdebug.trace_output_dir=/tmp
xdebug.trace_options=0
xdebug.trace_output_name=crc32
; Profiling
xdebug.profiler_append=0
xdebug.profiler_enable=0
xdebug.profiler_enable_trigger=0
xdebug.profiler_output_dir=/tmp
xdebug.profiler_output_name=crc32
Xdebug 日志
Log opened at 2016-06-30 20:30:29
I: Connecting to configured address/port: localhost:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/deceptivecon.com/public_html/index.php" language="PHP" xdebug:language_version="5.4.45" protocol_version="1.0" appid="2796" idekey="netbeans-xdebug"><engine version="2.4.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2016 by Derick Rethans]]></copyright></init>
<- feature_set -i 48 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="48" feature="show_hidden" success="1"></response>
<- feature_set -i 49 -n max_depth -v 3
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="49" feature="max_depth" success="1"></response>
<- feature_set -i 50 -n max_children -v 30
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="50" feature="max_children" success="1"></response>
<- feature_set -i 51 -n max_data -v 2048
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="51" feature="max_data" success="1"></response>
<- breakpoint_set -i 52 -t line -s enabled -f file:///var/www/html/deceptivecon.com/public_html/wp-content/plugins/myplugin/myplugin.php -n 409
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="52" state="enabled" id="27960008"></response>
<- breakpoint_set -i 53 -t line -s enabled -f file:///var/www/html/deceptivecon.com/public_html/wp-content/plugins/myplugin/myplugin.php -n 25
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="53" state="enabled" id="27960009"></response>
<- breakpoint_set -i 54 -t line -s enabled -f file:///var/www/html/deceptivecon.com/public_html/index.php -n 14
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="54" state="enabled" id="27960010"></response>
<- stdout -i 55 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="55" success="1"></response>
<- run -i 56
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="56" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/deceptivecon.com/public_html/index.php" lineno="14"></xdebug:message></response>
<- stack_get -i 57
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="57"><stack where="{main}" level="0" type="file" filename="file:///var/www/html/deceptivecon.com/public_html/index.php" lineno="14"></stack></response>
<- context_names -i 58
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="58"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>
<- context_get -i 59 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="59" context="0"><property name="$asd" fullname="$asd" type="uninitialized"></property></response>
<- context_get -i 60 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="60" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="1" numchildren="1" page="0" pagesize="30"><property name="wordpress_logged_in_8dc908eddc83e45e30112f8c82b2a980" fullname="$_COOKIE['wordpress_logged_in_8dc908eddc83e45e30112f8c82b2a980']" type="string" size="131" encoding="base64"><![CDATA[V2VibWFzdGVyR1B8MTQ2ODM0NDk3Mnx1NU5FUUxYeXp0WFFkVzF4ZnJUY1E4OERGbDZrYXNNMGh3ZHE2Yk5xajBxfDMwZThjNmZkZDIwZjJmMjFkNjlkZTIwYjYxMTAyOWMyNjZjMGZiMDM4MTAwNzlhNGNiZmM0YjI5OTZhOTlhMmU=]]></property></property><property name="$_ENV" fullname="$_ENV" type="array" children="0" numchildren="0" page="0" pagesize="30"></property><property name="$_FILES" fullname="$_FILES" type="array" children="0" numchildren="0" page="0" pagesize="30"></property><property name="$_GET" fullname="$_GET" type="array" children="1" numchildren="1" page="0" pagesize="30"><property name="XDEBUG_SESSION_START" fullname="$_GET['XDEBUG_SESSION_START']" type="string" size="15" encoding="base64"><![CDATA[bmV0YmVhbnMteGRlYnVn]]></property></property><property name="$_POST" fullname="$_POST" type="array" children="0" numchildren="0" page="0" pagesize="30"></property><property name="$_REQUEST" fullname="$_REQUEST" type="array" children="1" numchildren="1" page="0" pagesize="30"><property name="XDEBUG_SESSION_START" fullname="$_REQUEST['XDEBUG_SESSION_START']" type="string" size="15" encoding="base64"><![CDATA[bmV0YmVhbnMteGRlYnVn]]></property></property><property name="$_SERVER" fullname="$_SERVER" type="array" children="1" numchildren="27" page="0" pagesize="30"><property name="HTTP_HOST" fullname="$_SERVER['HTTP_HOST']" type="string" size="16" encoding="base64"><![CDATA[ZGVjZXB0aXZlY29uLmNvbQ==]]></property><property name="HTTP_USER_AGENT" fullname="$_SERVER['HTTP_USER_AGENT']" type="string" size="68" encoding="base64"><![CDATA[TW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjo0NS4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94LzQ1LjA=]]></property><property name="HTTP_ACCEPT" fullname="$_SERVER['HTTP_ACCEPT']" type="string" size="63" encoding="base64"><![CDATA[dGV4dC9odG1sLGFwcGxpY2F0aW9uL3hodG1sK3htbCxhcHBsaWNhdGlvbi94bWw7cT0wLjksKi8qO3E9MC44]]></property><property name="HTTP_ACCEPT_LANGUAGE" fullname="$_SERVER['HTTP_ACCEPT_LANGUAGE']" type="string" size="14" encoding="base64"><![CDATA[ZW4tVVMsZW47cT0wLjU=]]></property><property name="HTTP_ACCEPT_ENCODING" fullname="$_SERVER['HTTP_ACCEPT_ENCODING']" type="string" size="13" encoding="base64"><![CDATA[Z3ppcCwgZGVmbGF0ZQ==]]></property><property name="HTTP_COOKIE" fullname="$_SERVER['HTTP_COOKIE']" type="string" size="190" encoding="base64"><![CDATA[d29yZHByZXNzX2xvZ2dlZF9pbl84ZGM5MDhlZGRjODNlNDVlMzAxMTJmOGM4MmIyYTk4MD1XZWJtYXN0ZXJHUCU3QzE0NjgzNDQ5NzIlN0N1NU5FUUxYeXp0WFFkVzF4ZnJUY1E4OERGbDZrYXNNMGh3ZHE2Yk5xajBxJTdDMzBlOGM2ZmRkMjBmMmYyMWQ2OWRlMjBiNjExMDI5YzI2NmMwZmIwMzgxMDA3OWE0Y2JmYzRiMjk5NmE5OWEyZQ==]]></property><property name="HTTP_CONNECTION" fullname="$_SERVER['HTTP_CONNECTION']" type="string" size="10" encoding="base64"><![CDATA[a2VlcC1hbGl2ZQ==]]></property><property name="PATH" fullname="$_SERVER['PATH']" type="string" size="29" encoding="base64"><![CDATA[L3NiaW46L3Vzci9zYmluOi9iaW46L3Vzci9iaW4=]]></property><property name="SERVER_SIGNATURE" fullname="$_SERVER['SERVER_SIGNATURE']" type="string" size="77" encoding="base64"><![CDATA[PGFkZHJlc3M+QXBhY2hlLzIuMi4xNSAoQ2VudE9TKSBTZXJ2ZXIgYXQgZGVjZXB0aXZlY29uLmNvbSBQb3J0IDgwPC9hZGRyZXNzPgo=]]></property><property name="SERVER_SOFTWARE" fullname="$_SERVER['SERVER_SOFTWARE']" type="string" size="22" encoding="base64"><![CDATA[QXBhY2hlLzIuMi4xNSAoQ2VudE9TKQ==]]></property><property name="SERVER_NAME" fullname="$_SERVER['SERVER_NAME']" type="string" size="16" encoding="base64"><![CDATA[ZGVjZXB0aXZlY29uLmNvbQ==]]></property><property name="SERVER_ADDR" fullname="$_SERVER['SERVER_ADDR']" type="string" size="9" encoding="base64"><![CDATA[MTI3LjAuMC4x]]></property><property name="SERVER_PORT" fullname="$_SERVER['SERVER_PORT']" type="string" size="2" encoding="base64"><![CDATA[ODA=]]></property><property name="REMOTE_ADDR" fullname="$_SERVER['REMOTE_ADDR']" type="string" size="9" encoding="base64"><![CDATA[MTI3LjAuMC4x]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER['DOCUMENT_ROOT']" type="string" size="43" encoding="base64"><![CDATA[L3Zhci93d3cvaHRtbC9kZWNlcHRpdmVjb24uY29tL3B1YmxpY19odG1sLw==]]></property><property name="SERVER_ADMIN" fullname="$_SERVER['SERVER_ADMIN']" type="string" size="16" encoding="base64"><![CDATA[YWRzQGdwYnJhbmRzLmNvbQ==]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER['SCRIPT_FILENAME']" type="string" size="52" encoding="base64"><![CDATA[L3Zhci93d3cvaHRtbC9kZWNlcHRpdmVjb24uY29tL3B1YmxpY19odG1sL2luZGV4LnBocA==]]></property><property name="REMOTE_PORT" fullname="$_SERVER['REMOTE_PORT']" type="string" size="5" encoding="base64"><![CDATA[NDUyOTY=]]></property><property name="GATEWAY_INTERFACE" fullname="$_SERVER['GATEWAY_INTERFACE']" type="string" size="7" encoding="base64"><![CDATA[Q0dJLzEuMQ==]]></property><property name="SERVER_PROTOCOL" fullname="$_SERVER['SERVER_PROTOCOL']" type="string" size="8" encoding="base64"><![CDATA[SFRUUC8xLjE=]]></property><property name="REQUEST_METHOD" fullname="$_SERVER['REQUEST_METHOD']" type="string" size="3" encoding="base64"><![CDATA[R0VU]]></property><property name="QUERY_STRING" fullname="$_SERVER['QUERY_STRING']" type="string" size="36" encoding="base64"><![CDATA[WERFQlVHX1NFU1NJT05fU1RBUlQ9bmV0YmVhbnMteGRlYnVn]]></property><property name="REQUEST_URI" fullname="$_SERVER['REQUEST_URI']" type="string" size="47" encoding="base64"><![CDATA[L2luZGV4LnBocD9YREVCVUdfU0VTU0lPTl9TVEFSVD1uZXRiZWFucy14ZGVidWc=]]></property><property name="SCRIPT_NAME" fullname="$_SERVER['SCRIPT_NAME']" type="string" size="10" encoding="base64"><![CDATA[L2luZGV4LnBocA==]]></property><property name="PHP_SELF" fullname="$_SERVER['PHP_SELF']" type="string" size="10" encoding="base64"><![CDATA[L2luZGV4LnBocA==]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER['REQUEST_TIME_FLOAT']" type="float"><![CDATA[1467318629.215]]></property><property name="REQUEST_TIME" fullname="$_SERVER['REQUEST_TIME']" type="int"><![CDATA[1467318629]]></property></property></response>
<- context_get -i 61 -c 2
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="61" context="2"></response>
<- run -i 62
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="62" status="stopping" reason="ok"></response>
Log closed at 2016-06-30 20:30:37
【问题讨论】:
标签: php wordpress netbeans xdebug