View Issue Details

IDProjectCategoryView StatusLast Update
0001410XdebugStacktracespublic2021-04-14 16:09
ReporterchrBrd Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionwon't fix 
OSLinuxOS Version4.8.0-44-generic 
Product Version2.5.1 
Summary0001410: Debug session does not end if breakpoints are set in __debugInfo() magic methods or any methods called by them.
Description

XDebug generally works well for debugging stacks called by a __debugInfo magic method, but once the method has completed execution the debug dession will remain open until the process is stopped manually.

Steps To Reproduce

Run the attached script with breakpoints on lines 13 and 26.

Additional Information

Affects all methods with breakpoints in a stack called by debugInfo(). It does not matter whether debugInfo() returns a value or not.

TagsNo tags attached.
Attached Files
test.php (366 bytes)
xdebug.log (13,145 bytes)   
Log opened at 2017-03-29 08:20:31
I: Checking remote connect back address.
I: Checking header 'HTTP_X_FORWARDED_FOR'.
I: Checking header 'REMOTE_ADDR'.
I: Remote address found, connecting to 192.168.0.100:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/test/test.php" language="PHP" xdebug:language_version="7.0.14-1~dotdeb+8.1" protocol_version="1.0" appid="766" idekey="PHPSTORM"><engine version="2.5.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 1 -n show_hidden -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>

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

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

<- feature_set -i 4 -n extended_properties -v 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" status="starting" reason="ok"><error code="3"><message><![CDATA[invalid or missing options]]></message></error></response>

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

<- step_into -i 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="6" status="break" reason="ok"><xdebug:message filename="file:///var/www/test/test.php" lineno="3"></xdebug:message></response>

<- eval -i 7 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="7"><property type="bool"><![CDATA[0]]></property></response>

<- eval -i 8 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="8"><property type="bool"><![CDATA[1]]></property></response>

<- eval -i 9 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="9"><property type="string" size="13" encoding="base64"><![CDATA[MTkyLjE2OC4wLjIwMA==]]></property></response>

<- eval -i 10 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9QT1JUJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="10"><property type="string" size="2" encoding="base64"><![CDATA[ODA=]]></property></response>

<- eval -i 11 -- KHN0cmluZykoJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10p
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="eval" transaction_id="11"><property type="string" size="14" encoding="base64"><![CDATA[L3Rlc3QvdGVzdC5waHA=]]></property></response>

<- breakpoint_set -i 12 -t line -f file:///var/www/test/test.php -n 13
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="7660001"></response>

<- breakpoint_set -i 13 -t line -f file:///var/www/test/test.php -n 27
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="13" id="7660002"></response>

<- breakpoint_set -i 14 -t line -f file:///var/www/test/test.php -n 8
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="14" id="7660003"></response>

<- stack_get -i 15
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="15"><stack where="{main}" level="0" type="file" filename="file:///var/www/test/test.php" lineno="3"></stack></response>

<- run -i 16
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="16" status="break" reason="ok"><xdebug:message filename="file:///var/www/test/test.php" lineno="27"></xdebug:message></response>

<- stack_get -i 17
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="17"><stack where="{main}" level="0" type="file" filename="file:///var/www/test/test.php" lineno="27"></stack></response>

<- context_names -i 18
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="18"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>

<- context_get -i 19 -d 0 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="19" status="break" reason="ok"><xdebug:message filename="file:///var/www/test/test.php" lineno="13"></xdebug:message></response>

<- context_get -i 20 -d 0 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="20" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="1" numchildren="2" page="0" pagesize="100"><property name="_ga" fullname="$_COOKIE[&#39;_ga&#39;]" type="string" size="27" encoding="base64"><![CDATA[R0ExLjEuMTE4MTA3MDk2NC4xNDg2MTQ3MjMw]]></property><property name="XDEBUG_SESSION" fullname="$_COOKIE[&#39;XDEBUG_SESSION&#39;]" type="string" size="8" encoding="base64"><![CDATA[UEhQU1RPUk0=]]></property></property><property name="$_ENV" fullname="$_ENV" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_FILES" fullname="$_FILES" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_GET" fullname="$_GET" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_POST" fullname="$_POST" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_REQUEST" fullname="$_REQUEST" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_SERVER" fullname="$_SERVER" type="array" children="1" numchildren="31" page="0" pagesize="100"><property name="HTTP_HOST" fullname="$_SERVER[&#39;HTTP_HOST&#39;]" type="string" size="13" encoding="base64"><![CDATA[MTkyLjE2OC4wLjIwMA==]]></property><property name="HTTP_USER_AGENT" fullname="$_SERVER[&#39;HTTP_USER_AGENT&#39;]" type="string" size="68" encoding="base64"><![CDATA[TW96aWxsYS81LjAgKFgxMTsgTGludXggeDg2XzY0OyBydjo1NC4wKSBHZWNrby8yMDEwMDEwMSBGaXJlZm94LzU0LjA=]]></property><property name="HTTP_ACCEPT" fullname="$_SERVER[&#39;HTTP_ACCEPT&#39;]" type="string" size="63" encoding="base64"><![CDATA[dGV4dC9odG1sLGFwcGxpY2F0aW9uL3hodG1sK3htbCxhcHBsaWNhdGlvbi94bWw7cT0wLjksKi8qO3E9MC44]]></property><property name="HTTP_ACCEPT_LANGUAGE" fullname="$_SERVER[&#39;HTTP_ACCEPT_LANGUAGE&#39;]" type="string" size="14" encoding="base64"><![CDATA[ZW4tR0IsZW47cT0wLjU=]]></property><property name="HTTP_ACCEPT_ENCODING" fullname="$_SERVER[&#39;HTTP_ACCEPT_ENCODING&#39;]" type="string" size="13" encoding="base64"><![CDATA[Z3ppcCwgZGVmbGF0ZQ==]]></property><property name="HTTP_COOKIE" fullname="$_SERVER[&#39;HTTP_COOKIE&#39;]" type="string" size="56" encoding="base64"><![CDATA[X2dhPUdBMS4xLjExODEwNzA5NjQuMTQ4NjE0NzIzMDsgWERFQlVHX1NFU1NJT049UEhQU1RPUk0=]]></property><property name="HTTP_CONNECTION" fullname="$_SERVER[&#39;HTTP_CONNECTION&#39;]" type="string" size="10" encoding="base64"><![CDATA[a2VlcC1hbGl2ZQ==]]></property><property name="HTTP_UPGRADE_INSECURE_REQUESTS" fullname="$_SERVER[&#39;HTTP_UPGRADE_INSECURE_REQUESTS&#39;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="PATH" fullname="$_SERVER[&#39;PATH&#39;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="SERVER_SIGNATURE" fullname="$_SERVER[&#39;SERVER_SIGNATURE&#39;]" type="string" size="74" encoding="base64"><![CDATA[PGFkZHJlc3M+QXBhY2hlLzIuNC4xMCAoRGViaWFuKSBTZXJ2ZXIgYXQgMTkyLjE2OC4wLjIwMCBQb3J0IDgwPC9hZGRyZXNzPgo=]]></property><property name="SERVER_SOFTWARE" fullname="$_SERVER[&#39;SERVER_SOFTWARE&#39;]" type="string" size="22" encoding="base64"><![CDATA[QXBhY2hlLzIuNC4xMCAoRGViaWFuKQ==]]></property><property name="SERVER_NAME" fullname="$_SERVER[&#39;SERVER_NAME&#39;]" type="string" size="13" encoding="base64"><![CDATA[MTkyLjE2OC4wLjIwMA==]]></property><property name="SERVER_ADDR" fullname="$_SERVER[&#39;SERVER_ADDR&#39;]" type="string" size="13" encoding="base64"><![CDATA[MTkyLjE2OC4wLjIwMA==]]></property><property name="SERVER_PORT" fullname="$_SERVER[&#39;SERVER_PORT&#39;]" type="string" size="2" encoding="base64"><![CDATA[ODA=]]></property><property name="REMOTE_ADDR" fullname="$_SERVER[&#39;REMOTE_ADDR&#39;]" type="string" size="13" encoding="base64"><![CDATA[MTkyLjE2OC4wLjEwMA==]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER[&#39;DOCUMENT_ROOT&#39;]" type="string" size="8" encoding="base64"><![CDATA[L3Zhci93d3c=]]></property><property name="REQUEST_SCHEME" fullname="$_SERVER[&#39;REQUEST_SCHEME&#39;]" type="string" size="4" encoding="base64"><![CDATA[aHR0cA==]]></property><property name="CONTEXT_PREFIX" fullname="$_SERVER[&#39;CONTEXT_PREFIX&#39;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="CONTEXT_DOCUMENT_ROOT" fullname="$_SERVER[&#39;CONTEXT_DOCUMENT_ROOT&#39;]" type="string" size="8" encoding="base64"><![CDATA[L3Zhci93d3c=]]></property><property name="SERVER_ADMIN" fullname="$_SERVER[&#39;SERVER_ADMIN&#39;]" type="string" size="19" encoding="base64"><![CDATA[d2VibWFzdGVyQGxvY2FsaG9zdA==]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&#39;SCRIPT_FILENAME&#39;]" type="string" size="22" encoding="base64"><![CDATA[L3Zhci93d3cvdGVzdC90ZXN0LnBocA==]]></property><property name="REMOTE_PORT" fullname="$_SERVER[&#39;REMOTE_PORT&#39;]" type="string" size="5" encoding="base64"><![CDATA[NTE1NzQ=]]></property><property name="GATEWAY_INTERFACE" fullname="$_SERVER[&#39;GATEWAY_INTERFACE&#39;]" type="string" size="7" encoding="base64"><![CDATA[Q0dJLzEuMQ==]]></property><property name="SERVER_PROTOCOL" fullname="$_SERVER[&#39;SERVER_PROTOCOL&#39;]" type="string" size="8" encoding="base64"><![CDATA[SFRUUC8xLjE=]]></property><property name="REQUEST_METHOD" fullname="$_SERVER[&#39;REQUEST_METHOD&#39;]" type="string" size="3" encoding="base64"><![CDATA[R0VU]]></property><property name="QUERY_STRING" fullname="$_SERVER[&#39;QUERY_STRING&#39;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="REQUEST_URI" fullname="$_SERVER[&#39;REQUEST_URI&#39;]" type="string" size="14" encoding="base64"><![CDATA[L3Rlc3QvdGVzdC5waHA=]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&#39;SCRIPT_NAME&#39;]" type="string" size="14" encoding="base64"><![CDATA[L3Rlc3QvdGVzdC5waHA=]]></property><property name="PHP_SELF" fullname="$_SERVER[&#39;PHP_SELF&#39;]" type="string" size="14" encoding="base64"><![CDATA[L3Rlc3QvdGVzdC5waHA=]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&#39;REQUEST_TIME_FLOAT&#39;]" type="float"><![CDATA[1490775631.418]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&#39;REQUEST_TIME&#39;]" type="int"><![CDATA[1490775631]]></property></property></response>

<- context_get -i 21 -d 0 -c 2
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="21" context="2"></response>

<- run -i 22
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="19" context="0"><property name="$test" fullname="$test" type="object" classname="Test" children="1" numchildren="1" page="0" pagesize="100"><property name="foo" fullname="$test-&gt;foo" facet="public" type="string" size="3" encoding="base64"><![CDATA[YmFy]]></property></property></response>


### PROCESS STOPPED MANUALLY:
<- stop -i 23
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stop" transaction_id="23" status="stopped" reason="ok"></response>

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

<- run -i 24
Log closed at 2017-03-29 08:21:09


xdebug.log (13,145 bytes)   
Operating SystemLinux 4.8.0-44-generic; Client - Mint Serena , Host - Debian Jessie
PHP Version7.0.15-7.0.19

Activities

derick

2017-03-28 12:02

administrator   ~0004246

Hi!

Thanks for the report.

I have two questions:

  1. Could you please add a remote debugging log as well to go with this script? There is information at https://xdebug.org/support.php#remote on how to do that.

  2. Which IDE are you using?

cheers,
Derick

chrBrd

2017-03-28 15:45

reporter   ~0004247

IDE is PHPStorm.

I've been trying to grab a log for you - my current setup uses a Docker container (should maybe have mentioned that in the report, sorry) based on the PHP:7.0-Apache image from the Docker repos and for whatever reason I can't get XDebug to output a log file anywhere. Permissions are definitely correct, I enabled the Profiler to test and it's outputting to the desired directory without issue.

I'll try it out on proper test server later this evening to try and replicate the problem and get you a proper log.

chrBrd

2017-03-29 08:27

reporter   ~0004248

Okay, I've uploaded a log file from a test server. XDebug version is 2.5.0, PHP Version 7.0.14-1~dotdeb+8.1, Host OS is Debian 8 with kernel 3.16.0-4-amd64.

I've added a line to the log file to indicate where I had to stop the process manually.

derick

2021-03-17 09:38

administrator   ~0005767

Is this issue still relevant to you?

derick

2021-04-14 16:09

administrator   ~0005842

Closing this, as it is missing requested feedback.

Issue History

Date Modified Username Field Change
2017-03-28 11:16 chrBrd New Issue
2017-03-28 11:16 chrBrd File Added: test.php
2017-03-28 12:02 derick Note Added: 0004246
2017-03-28 12:02 derick Assigned To => derick
2017-03-28 12:02 derick Status new => feedback
2017-03-28 15:45 chrBrd Note Added: 0004247
2017-03-28 15:45 chrBrd Status feedback => assigned
2017-03-29 08:24 chrBrd File Added: xdebug.log
2017-03-29 08:27 chrBrd Note Added: 0004248
2021-03-17 09:38 derick Status assigned => feedback
2021-03-17 09:38 derick Note Added: 0005767
2021-04-14 16:09 derick Status feedback => closed
2021-04-14 16:09 derick Resolution open => won't fix
2021-04-14 16:09 derick Note Added: 0005842