View Issue Details

IDProjectCategoryView StatusLast Update
0001771XdebugStep Debuggingpublic2020-03-25 15:59
Reportersamuel.nogueira Assigned Toderick  
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionno change required 
OSLinux 
Product Version2.9.4 
Summary0001771: Cannot step debug fork child processes
Description

While debugging a script which forks, I expected step-debugging to be available in child processes, but only works in the parent process instead (xdebug log in attachment).

Steps To Reproduce

Debug the following script, with 2 breakpoints:

<code php>
<?php

echo "started\n";
if ($child = pcntl_fork()) {
sleep(5);
echo "hello from parent\n"; //breakpoint no. 1 here
pcntl_waitpid($child, $status);
echo "finished\n";
} else {
echo "hello from child\n"; //breakpoint no. 2 here
}
</code>

Expected execution to immediately stop at breakpoint no. 2
Execution stops after 5 seconds at breakpoint no. 1 instead

Additional Information

PHP 7.4.0 (cli) (built: Nov 28 2019 20:31:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Xdebug v2.9.4, Copyright (c) 2002-2020, by Derick Rethans

PhpStorm 2019.3.4
Build #PS-193.6911.26, built on March 18, 2020

Docker version 19.03.3, build a872fc2f86

TagsNo tags attached.
Attached Files
Dockerfile (116 bytes)   
FROM php

RUN docker-php-ext-install pcntl \
    && pecl install xdebug-2.9.4 \
    && docker-php-ext-enable xdebug
Dockerfile (116 bytes)   
script.php (249 bytes)   
<?php

echo "started\n";
if ($child = pcntl_fork()) {
    sleep(5);
    echo "hello from parent\n"; //breakpoint no. 1 here
    pcntl_waitpid($child, $status);
    echo "finished\n";
} else {
    echo "hello from child\n"; //breakpoint no. 2 here
}
script.php (249 bytes)   
xdebug.log (14,322 bytes)   
[1] Log opened at 2020-03-24 18:03:35
[1] I: Connecting to configured address/port: 172.17.0.1:9000.
[1] I: Connected to client. :-)
[1] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///app/script.php" language="PHP" xdebug:language_version="7.4.0" protocol_version="1.0" appid="1" idekey="14149"><engine version="2.9.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

[1] <- eval -i 1 -- KHN0cmluZykoaW5pX2dldCgneGRlYnVnLmNvdmVyYWdlX2VuYWJsZScpLic7Jy5pbmlfZ2V0KCd4ZGVidWcucHJvZmlsZXJfZW5hYmxlJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfYXV0b3N0YXJ0JykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfY29ubmVjdF9iYWNrJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfbW9kZScpKQ==
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="1"><property type="string" size="11" encoding="base64"><![CDATA[MTswOzA7MDtyZXE=]]></property></response>

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

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

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

[1] <- feature_set -i 5 -n extended_properties -v 1
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="extended_properties" success="1"></response>

[1] <- feature_set -i 6 -n resolved_breakpoints -v 1
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="6" feature="resolved_breakpoints" success="1"></response>

[1] <- status -i 7
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="status" transaction_id="7" status="starting" reason="ok"></response>

[1] <- step_into -i 8
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="8" status="break" reason="ok"><xdebug:message filename="file:///app/script.php" lineno="3"></xdebug:message></response>

[1] <- breakpoint_set -i 9 -t line -f file:///app/script.php -n 10
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="10001" resolved="resolved"></response>

[1] <- breakpoint_set -i 10 -t line -f file:///app/script.php -n 6
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="10002" resolved="resolved"></response>

[1] <- stack_get -i 11
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="11"><stack where="{main}" level="0" type="file" filename="file:///app/script.php" lineno="3"></stack></response>

[1] <- run -i 12
[6] Log closed at 2020-03-24 18:03:35

[6] Log opened at 2020-03-24 18:03:35
[6] I: Connecting to configured address/port: 172.17.0.1:9000.
[6] W: Creating socket for '172.17.0.1:9000', poll success, but error: Operation now in progress (29).
[6] E: Could not connect to client. :-(
[6] Log closed at 2020-03-24 18:03:35

[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="12" status="break" reason="ok"><xdebug:message filename="file:///app/script.php" lineno="6"></xdebug:message></response>

[1] <- stack_get -i 13
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="13"><stack where="{main}" level="0" type="file" filename="file:///app/script.php" lineno="6"></stack></response>

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

[1] <- context_get -i 15 -d 0 -c 0
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="15" context="0"><property name="$child" fullname="$child" type="int"><![CDATA[6]]></property><property name="$status" fullname="$status" type="uninitialized"></property></response>

[1] <- context_get -i 16 -d 0 -c 1
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="16" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_ENV" fullname="$_ENV" type="array" children="1" numchildren="17" page="0" pagesize="100"><property name="PATH" fullname="$_ENV[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_ENV[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[ZTZkY2UwMzdhMTlm]]></property><property name="TERM" fullname="$_ENV[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_ENV[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_ENV[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTE0MTQ5]]></property><property type="string" size="76"><name encoding="base64"><![CDATA[UEhQSVpFX0RFUFM=]]></name><fullname encoding="base64"><![CDATA[JF9FTlZbIlBIUElaRV9ERVBTIl0=]]></fullname><value encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></value></property><property name="PHP_INI_DIR" fullname="$_ENV[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_ENV[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_ENV[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_ENV[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_ENV[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[NDI2NzBBN0ZFNEQwNDQxQzhFNDYzMjM0OUU0RkRDMDc0QTRFRjAyRCA1QTUyODgwNzgxRjc1NTYwOEJGODE1RkM5MTBERUI0NkY1M0VBMzEy]]></property><property name="PHP_VERSION" fullname="$_ENV[&quot;PHP_VERSION&quot;]" type="string" size="5" encoding="base64"><![CDATA[Ny40LjA=]]></property><property name="PHP_URL" fullname="$_ENV[&quot;PHP_URL&quot;]" type="string" size="57" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC4wLnRhci54ei9mcm9tL3RoaXMvbWlycm9y]]></property><property name="PHP_ASC_URL" fullname="$_ENV[&quot;PHP_ASC_URL&quot;]" type="string" size="61" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC4wLnRhci54ei5hc2MvZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_SHA256" fullname="$_ENV[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[OWJiNzUxYjIwZTVkNmNjMWVhOWIxZWJmMjNlZjJkNWYwN2Y5OWIyZDljYzQxN2JmMWQ3MGMwNGY4YjIwZWM0Mg==]]></property><property name="PHP_MD5" fullname="$_ENV[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_ENV[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property></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="26" page="0" pagesize="100"><property name="PATH" fullname="$_SERVER[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_SERVER[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[ZTZkY2UwMzdhMTlm]]></property><property name="TERM" fullname="$_SERVER[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_SERVER[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_SERVER[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTE0MTQ5]]></property><property type="string" size="76"><name encoding="base64"><![CDATA[UEhQSVpFX0RFUFM=]]></name><fullname encoding="base64"><![CDATA[JF9TRVJWRVJbIlBIUElaRV9ERVBTIl0=]]></fullname><value encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></value></property><property name="PHP_INI_DIR" fullname="$_SERVER[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_SERVER[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_SERVER[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_SERVER[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_SERVER[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[NDI2NzBBN0ZFNEQwNDQxQzhFNDYzMjM0OUU0RkRDMDc0QTRFRjAyRCA1QTUyODgwNzgxRjc1NTYwOEJGODE1RkM5MTBERUI0NkY1M0VBMzEy]]></property><property name="PHP_VERSION" fullname="$_SERVER[&quot;PHP_VERSION&quot;]" type="string" size="5" encoding="base64"><![CDATA[Ny40LjA=]]></property><property name="PHP_URL" fullname="$_SERVER[&quot;PHP_URL&quot;]" type="string" size="57" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC4wLnRhci54ei9mcm9tL3RoaXMvbWlycm9y]]></property><property name="PHP_ASC_URL" fullname="$_SERVER[&quot;PHP_ASC_URL&quot;]" type="string" size="61" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC4wLnRhci54ei5hc2MvZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_SHA256" fullname="$_SERVER[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[OWJiNzUxYjIwZTVkNmNjMWVhOWIxZWJmMjNlZjJkNWYwN2Y5OWIyZDljYzQxN2JmMWQ3MGMwNGY4YjIwZWM0Mg==]]></property><property name="PHP_MD5" fullname="$_SERVER[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_SERVER[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property><property name="PHP_SELF" fullname="$_SERVER[&quot;PHP_SELF&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&quot;SCRIPT_NAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&quot;SCRIPT_FILENAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="PATH_TRANSLATED" fullname="$_SERVER[&quot;PATH_TRANSLATED&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER[&quot;DOCUMENT_ROOT&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&quot;REQUEST_TIME_FLOAT&quot;]" type="float"><![CDATA[1585073015.1165]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&quot;REQUEST_TIME&quot;]" type="int"><![CDATA[1585073015]]></property><property name="argv" fullname="$_SERVER[&quot;argv&quot;]" type="array" children="1" numchildren="1"></property><property name="argc" fullname="$_SERVER[&quot;argc&quot;]" type="int"><![CDATA[1]]></property></property></response>

[1] <- context_get -i 17 -d 0 -c 2
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="17" context="2"></response>

[1] <- run -i 18
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="18" status="stopping" reason="ok"></response>

[1] <- run -i 19
[1] Log closed at 2020-03-24 18:03:42

xdebug.log (14,322 bytes)   
Operating SystemLinux
PHP Version7.4.0-7.4.4

Activities

samuel.nogueira

2020-03-24 18:58

reporter   ~0005346

Seems this wasn't an issue in versions prior to 2.7.0, could be related to https://bugs.xdebug.org/view.php?id=938

derick

2020-03-25 11:09

administrator   ~0005347

Hi,

Prior to 2.7.0 this didn't work at all :-)

I think the problem here is that Xdebug only checks whether to make a debug connection when a function is called, otherwise it would be way too slow. (It's already too slow, but there is 0001755, with a PR: https://github.com/xdebug/xdebug/pull/556). I think that if you put the "echo" in a function, and call that function in your "} else {" case, you will see that the forked process will make a separate connection to your IDE.

cheers,
Derick

samuel.nogueira

2020-03-25 11:58

reporter   ~0005348

Couldn't test with newer PHP versions, but at least with PHP 7.2.29 + Xdebug 2.6.1, it was working, execution stopped in each breakpoint, even without changes to the script (still using echo). Kindly see attached Xdebug remote log, Dockerfile and screen cast:

xdebug261.log (23,585 bytes)   
Log opened at 2020-03-25 11:54:28
I: Connecting to configured address/port: 172.17.0.1:9000.
I: Connected to client. :-)
-> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" fileuri="file:///app/script.php" language="PHP" xdebug:language_version="7.2.29" protocol_version="1.0" appid="1" idekey="11100"><engine version="2.6.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[http://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2018 by Derick Rethans]]></copyright></init>

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

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

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

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

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

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

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

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

<- breakpoint_set -i 9 -t line -f file:///app/script.php -n 6
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="10001"></response>

<- breakpoint_set -i 10 -t line -f file:///app/script.php -n 10
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="10002"></response>

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

<- run -i 12
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="12" status="break" reason="ok"><xdebug:message filename="file:///app/script.php" lineno="10"></xdebug:message></response>

<- stack_get -i 13
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="13"><stack where="{main}" level="0" type="file" filename="file:///app/script.php" lineno="10"></stack></response>

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

<- context_get -i 15 -d 0 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="15" context="0"><property name="$child" fullname="$child" type="int"><![CDATA[0]]></property><property name="$status" fullname="$status" type="uninitialized"></property></response>

<- context_get -i 16 -d 0 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="16" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_ENV" fullname="$_ENV" type="array" children="1" numchildren="17" page="0" pagesize="100"><property name="PATH" fullname="$_ENV[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_ENV[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[YzFiMzU0Zjc5NTg3]]></property><property name="TERM" fullname="$_ENV[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_ENV[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_ENV[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTExMTAw]]></property><property name="PHPIZE_DEPS" fullname="$_ENV[&quot;PHPIZE_DEPS&quot;]" type="string" size="76" encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></property><property name="PHP_INI_DIR" fullname="$_ENV[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_ENV[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_ENV[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_ENV[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_ENV[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[MTcyOUY4MzkzOERBNDRFMjdCQTBGNEQzREJEQjM5NzQ3MEQxMjE3MiBCMUI0NEQ4RjAyMUU0RTJENjAyMUU5OTVEQzlGRjhEM0VFNUFGMjdG]]></property><property name="PHP_VERSION" fullname="$_ENV[&quot;PHP_VERSION&quot;]" type="string" size="6" encoding="base64"><![CDATA[Ny4yLjI5]]></property><property name="PHP_URL" fullname="$_ENV[&quot;PHP_URL&quot;]" type="string" size="58" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHovZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_ASC_URL" fullname="$_ENV[&quot;PHP_ASC_URL&quot;]" type="string" size="62" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHouYXNjL2Zyb20vdGhpcy9taXJyb3I=]]></property><property name="PHP_SHA256" fullname="$_ENV[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[YjExN2RlNzQxMzZiZjRiNDM5ZDY2M2JlOWNmMGM4ZTA2YTI2MGMxZjM0MGY2Yjc1Y2NhZGI2MDkxNTNhN2ZlOA==]]></property><property name="PHP_MD5" fullname="$_ENV[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_ENV[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property></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="26" page="0" pagesize="100"><property name="PATH" fullname="$_SERVER[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_SERVER[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[YzFiMzU0Zjc5NTg3]]></property><property name="TERM" fullname="$_SERVER[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_SERVER[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_SERVER[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTExMTAw]]></property><property name="PHPIZE_DEPS" fullname="$_SERVER[&quot;PHPIZE_DEPS&quot;]" type="string" size="76" encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></property><property name="PHP_INI_DIR" fullname="$_SERVER[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_SERVER[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_SERVER[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_SERVER[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_SERVER[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[MTcyOUY4MzkzOERBNDRFMjdCQTBGNEQzREJEQjM5NzQ3MEQxMjE3MiBCMUI0NEQ4RjAyMUU0RTJENjAyMUU5OTVEQzlGRjhEM0VFNUFGMjdG]]></property><property name="PHP_VERSION" fullname="$_SERVER[&quot;PHP_VERSION&quot;]" type="string" size="6" encoding="base64"><![CDATA[Ny4yLjI5]]></property><property name="PHP_URL" fullname="$_SERVER[&quot;PHP_URL&quot;]" type="string" size="58" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHovZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_ASC_URL" fullname="$_SERVER[&quot;PHP_ASC_URL&quot;]" type="string" size="62" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHouYXNjL2Zyb20vdGhpcy9taXJyb3I=]]></property><property name="PHP_SHA256" fullname="$_SERVER[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[YjExN2RlNzQxMzZiZjRiNDM5ZDY2M2JlOWNmMGM4ZTA2YTI2MGMxZjM0MGY2Yjc1Y2NhZGI2MDkxNTNhN2ZlOA==]]></property><property name="PHP_MD5" fullname="$_SERVER[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_SERVER[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property><property name="PHP_SELF" fullname="$_SERVER[&quot;PHP_SELF&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&quot;SCRIPT_NAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&quot;SCRIPT_FILENAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="PATH_TRANSLATED" fullname="$_SERVER[&quot;PATH_TRANSLATED&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER[&quot;DOCUMENT_ROOT&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&quot;REQUEST_TIME_FLOAT&quot;]" type="float"><![CDATA[1585137268.4311]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&quot;REQUEST_TIME&quot;]" type="int"><![CDATA[1585137268]]></property><property name="argv" fullname="$_SERVER[&quot;argv&quot;]" type="array" children="1" numchildren="1"></property><property name="argc" fullname="$_SERVER[&quot;argc&quot;]" type="int"><![CDATA[1]]></property></property></response>

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

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

<- run -i 19
Log closed at 2020-03-25 11:54:30

-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="run" transaction_id="12" status="break" reason="ok"><xdebug:message filename="file:///app/script.php" lineno="6"></xdebug:message></response>

<- stack_get -i 20
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="20"><stack where="{main}" level="0" type="file" filename="file:///app/script.php" lineno="6"></stack></response>

<- context_get -i 21 -d 0 -c 0
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="21" context="0"><property name="$child" fullname="$child" type="int"><![CDATA[6]]></property><property name="$status" fullname="$status" type="uninitialized"></property></response>

<- context_get -i 22 -d 0 -c 1
-> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="http://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="22" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_ENV" fullname="$_ENV" type="array" children="1" numchildren="17" page="0" pagesize="100"><property name="PATH" fullname="$_ENV[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_ENV[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[YzFiMzU0Zjc5NTg3]]></property><property name="TERM" fullname="$_ENV[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_ENV[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_ENV[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTExMTAw]]></property><property name="PHPIZE_DEPS" fullname="$_ENV[&quot;PHPIZE_DEPS&quot;]" type="string" size="76" encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></property><property name="PHP_INI_DIR" fullname="$_ENV[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_ENV[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_ENV[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_ENV[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_ENV[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[MTcyOUY4MzkzOERBNDRFMjdCQTBGNEQzREJEQjM5NzQ3MEQxMjE3MiBCMUI0NEQ4RjAyMUU0RTJENjAyMUU5OTVEQzlGRjhEM0VFNUFGMjdG]]></property><property name="PHP_VERSION" fullname="$_ENV[&quot;PHP_VERSION&quot;]" type="string" size="6" encoding="base64"><![CDATA[Ny4yLjI5]]></property><property name="PHP_URL" fullname="$_ENV[&quot;PHP_URL&quot;]" type="string" size="58" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHovZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_ASC_URL" fullname="$_ENV[&quot;PHP_ASC_URL&quot;]" type="string" size="62" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHouYXNjL2Zyb20vdGhpcy9taXJyb3I=]]></property><property name="PHP_SHA256" fullname="$_ENV[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[YjExN2RlNzQxMzZiZjRiNDM5ZDY2M2JlOWNmMGM4ZTA2YTI2MGMxZjM0MGY2Yjc1Y2NhZGI2MDkxNTNhN2ZlOA==]]></property><property name="PHP_MD5" fullname="$_ENV[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_ENV[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property></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="26" page="0" pagesize="100"><property name="PATH" fullname="$_SERVER[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_SERVER[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[YzFiMzU0Zjc5NTg3]]></property><property name="TERM" fullname="$_SERVER[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_SERVER[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_SERVER[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTExMTAw]]></property><property name="PHPIZE_DEPS" fullname="$_SERVER[&quot;PHPIZE_DEPS&quot;]" type="string" size="76" encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></property><property name="PHP_INI_DIR" fullname="$_SERVER[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_SERVER[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_SERVER[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_SERVER[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_SERVER[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[MTcyOUY4MzkzOERBNDRFMjdCQTBGNEQzREJEQjM5NzQ3MEQxMjE3MiBCMUI0NEQ4RjAyMUU0RTJENjAyMUU5OTVEQzlGRjhEM0VFNUFGMjdG]]></property><property name="PHP_VERSION" fullname="$_SERVER[&quot;PHP_VERSION&quot;]" type="string" size="6" encoding="base64"><![CDATA[Ny4yLjI5]]></property><property name="PHP_URL" fullname="$_SERVER[&quot;PHP_URL&quot;]" type="string" size="58" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHovZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_ASC_URL" fullname="$_SERVER[&quot;PHP_ASC_URL&quot;]" type="string" size="62" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuMi4yOS50YXIueHouYXNjL2Zyb20vdGhpcy9taXJyb3I=]]></property><property name="PHP_SHA256" fullname="$_SERVER[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[YjExN2RlNzQxMzZiZjRiNDM5ZDY2M2JlOWNmMGM4ZTA2YTI2MGMxZjM0MGY2Yjc1Y2NhZGI2MDkxNTNhN2ZlOA==]]></property><property name="PHP_MD5" fullname="$_SERVER[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_SERVER[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property><property name="PHP_SELF" fullname="$_SERVER[&quot;PHP_SELF&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&quot;SCRIPT_NAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&quot;SCRIPT_FILENAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="PATH_TRANSLATED" fullname="$_SERVER[&quot;PATH_TRANSLATED&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER[&quot;DOCUMENT_ROOT&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&quot;REQUEST_TIME_FLOAT&quot;]" type="float"><![CDATA[1585137268.4311]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&quot;REQUEST_TIME&quot;]" type="int"><![CDATA[1585137268]]></property><property name="argv" fullname="$_SERVER[&quot;argv&quot;]" type="array" children="1" numchildren="1"></property><property name="argc" fullname="$_SERVER[&quot;argc&quot;]" type="int"><![CDATA[1]]></property></property></response>

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

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

<- run -i 25
Log closed at 2020-03-25 11:54:35

xdebug261.log (23,585 bytes)   
xdebug261.Dockerfile (120 bytes)   
FROM php:7.2

RUN docker-php-ext-install pcntl \
    && pecl install xdebug-2.6.1 \
    && docker-php-ext-enable xdebug
xdebug261.Dockerfile (120 bytes)   

derick

2020-03-25 12:06

administrator   ~0005349

Did you not see/read my second paragraph?

I think the problem here is that Xdebug only checks whether to make a debug connection when a function is called, otherwise it would be way too slow. (It's already too slow, but there is 0001755, with a PR: https://github.com/xdebug/xdebug/pull/556). I think that if you put the "echo" in a function, and call that function in your "} else {" case, you will see that the forked process will make a separate connection to your IDE.

samuel.nogueira

2020-03-25 15:13

reporter   ~0005350

I did, and I did try it out first, but it didn't made a difference, sorry I didn't mention that in the note.
Attached updated script with function calls instead of echo + screen cast + xdebug log.
Please let me know if there's anything I can do to help you replicate the issue.

xdebug-2.log (14,325 bytes)   
[1] Log opened at 2020-03-25 15:10:37
[1] I: Connecting to configured address/port: 172.17.0.1:9000.
[1] I: Connected to client. :-)
[1] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///app/script.php" language="PHP" xdebug:language_version="7.4.4" protocol_version="1.0" appid="1" idekey="12232"><engine version="2.9.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2020 by Derick Rethans]]></copyright></init>

[1] <- eval -i 1 -- KHN0cmluZykoaW5pX2dldCgneGRlYnVnLmNvdmVyYWdlX2VuYWJsZScpLic7Jy5pbmlfZ2V0KCd4ZGVidWcucHJvZmlsZXJfZW5hYmxlJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfYXV0b3N0YXJ0JykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfY29ubmVjdF9iYWNrJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfbW9kZScpKQ==
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="1"><property type="string" size="11" encoding="base64"><![CDATA[MTswOzA7MDtyZXE=]]></property></response>

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

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

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

[1] <- feature_set -i 5 -n extended_properties -v 1
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="extended_properties" success="1"></response>

[1] <- feature_set -i 6 -n resolved_breakpoints -v 1
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="6" feature="resolved_breakpoints" success="1"></response>

[1] <- status -i 7
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="status" transaction_id="7" status="starting" reason="ok"></response>

[1] <- step_into -i 8
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="8" status="break" reason="ok"><xdebug:message filename="file:///app/script.php" lineno="8"></xdebug:message></response>

[1] <- breakpoint_set -i 9 -t line -f file:///app/script.php -n 12
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="10001" resolved="resolved"></response>

[1] <- breakpoint_set -i 10 -t line -f file:///app/script.php -n 16
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="10002" resolved="resolved"></response>

[1] <- stack_get -i 11
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="11"><stack where="{main}" level="0" type="file" filename="file:///app/script.php" lineno="8"></stack></response>

[1] <- run -i 12
[9] Log closed at 2020-03-25 15:10:37

[9] Log opened at 2020-03-25 15:10:37
[9] I: Connecting to configured address/port: 172.17.0.1:9000.
[9] W: Creating socket for '172.17.0.1:9000', poll success, but error: Operation now in progress (29).
[9] E: Could not connect to client. :-(
[9] Log closed at 2020-03-25 15:10:37

[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="12" status="break" reason="ok"><xdebug:message filename="file:///app/script.php" lineno="12"></xdebug:message></response>

[1] <- stack_get -i 13
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="13"><stack where="{main}" level="0" type="file" filename="file:///app/script.php" lineno="12"></stack></response>

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

[1] <- context_get -i 15 -d 0 -c 0
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="15" context="0"><property name="$child" fullname="$child" type="int"><![CDATA[9]]></property><property name="$status" fullname="$status" type="uninitialized"></property></response>

[1] <- context_get -i 16 -d 0 -c 1
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="16" context="1"><property name="$_COOKIE" fullname="$_COOKIE" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><property name="$_ENV" fullname="$_ENV" type="array" children="1" numchildren="17" page="0" pagesize="100"><property name="PATH" fullname="$_ENV[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_ENV[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[ZDA4MDc1MTIyOTk3]]></property><property name="TERM" fullname="$_ENV[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_ENV[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_ENV[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTEyMjMy]]></property><property type="string" size="76"><name encoding="base64"><![CDATA[UEhQSVpFX0RFUFM=]]></name><fullname encoding="base64"><![CDATA[JF9FTlZbIlBIUElaRV9ERVBTIl0=]]></fullname><value encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></value></property><property name="PHP_INI_DIR" fullname="$_ENV[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_ENV[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_ENV[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_ENV[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_ENV[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[NDI2NzBBN0ZFNEQwNDQxQzhFNDYzMjM0OUU0RkRDMDc0QTRFRjAyRCA1QTUyODgwNzgxRjc1NTYwOEJGODE1RkM5MTBERUI0NkY1M0VBMzEy]]></property><property name="PHP_VERSION" fullname="$_ENV[&quot;PHP_VERSION&quot;]" type="string" size="5" encoding="base64"><![CDATA[Ny40LjQ=]]></property><property name="PHP_URL" fullname="$_ENV[&quot;PHP_URL&quot;]" type="string" size="57" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC40LnRhci54ei9mcm9tL3RoaXMvbWlycm9y]]></property><property name="PHP_ASC_URL" fullname="$_ENV[&quot;PHP_ASC_URL&quot;]" type="string" size="61" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC40LnRhci54ei5hc2MvZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_SHA256" fullname="$_ENV[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[MTg3M2M0Y2VmZGQzZGY5YTc4ZGNmZmIyMTk4YmJhNWMyZjA0NjRmNTVjOWM5NjA3MjBjODRkZjQ4M2ZjYTc0Yw==]]></property><property name="PHP_MD5" fullname="$_ENV[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_ENV[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property></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="26" page="0" pagesize="100"><property name="PATH" fullname="$_SERVER[&quot;PATH&quot;]" type="string" size="60" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9zYmluOi91c3IvbG9jYWwvYmluOi91c3Ivc2JpbjovdXNyL2Jpbjovc2JpbjovYmlu]]></property><property name="HOSTNAME" fullname="$_SERVER[&quot;HOSTNAME&quot;]" type="string" size="12" encoding="base64"><![CDATA[ZDA4MDc1MTIyOTk3]]></property><property name="TERM" fullname="$_SERVER[&quot;TERM&quot;]" type="string" size="5" encoding="base64"><![CDATA[eHRlcm0=]]></property><property name="JETBRAINS_REMOTE_RUN" fullname="$_SERVER[&quot;JETBRAINS_REMOTE_RUN&quot;]" type="string" size="1" encoding="base64"><![CDATA[MQ==]]></property><property name="XDEBUG_CONFIG" fullname="$_SERVER[&quot;XDEBUG_CONFIG&quot;]" type="string" size="12" encoding="base64"><![CDATA[aWRla2V5PTEyMjMy]]></property><property type="string" size="76"><name encoding="base64"><![CDATA[UEhQSVpFX0RFUFM=]]></name><fullname encoding="base64"><![CDATA[JF9TRVJWRVJbIlBIUElaRV9ERVBTIl0=]]></fullname><value encoding="base64"><![CDATA[YXV0b2NvbmYgCQlkcGtnLWRldiAJCWZpbGUgCQlnKysgCQlnY2MgCQlsaWJjLWRldiAJCW1ha2UgCQlwa2ctY29uZmlnIAkJcmUyYw==]]></value></property><property name="PHP_INI_DIR" fullname="$_SERVER[&quot;PHP_INI_DIR&quot;]" type="string" size="18" encoding="base64"><![CDATA[L3Vzci9sb2NhbC9ldGMvcGhw]]></property><property name="PHP_CFLAGS" fullname="$_SERVER[&quot;PHP_CFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_CPPFLAGS" fullname="$_SERVER[&quot;PHP_CPPFLAGS&quot;]" type="string" size="83" encoding="base64"><![CDATA[LWZzdGFjay1wcm90ZWN0b3Itc3Ryb25nIC1mcGljIC1mcGllIC1PMiAtRF9MQVJHRUZJTEVfU09VUkNFIC1EX0ZJTEVfT0ZGU0VUX0JJVFM9NjQ=]]></property><property name="PHP_LDFLAGS" fullname="$_SERVER[&quot;PHP_LDFLAGS&quot;]" type="string" size="34" encoding="base64"><![CDATA[LVdsLC1PMSAtV2wsLS1oYXNoLXN0eWxlPWJvdGggLXBpZQ==]]></property><property name="GPG_KEYS" fullname="$_SERVER[&quot;GPG_KEYS&quot;]" type="string" size="81" encoding="base64"><![CDATA[NDI2NzBBN0ZFNEQwNDQxQzhFNDYzMjM0OUU0RkRDMDc0QTRFRjAyRCA1QTUyODgwNzgxRjc1NTYwOEJGODE1RkM5MTBERUI0NkY1M0VBMzEy]]></property><property name="PHP_VERSION" fullname="$_SERVER[&quot;PHP_VERSION&quot;]" type="string" size="5" encoding="base64"><![CDATA[Ny40LjQ=]]></property><property name="PHP_URL" fullname="$_SERVER[&quot;PHP_URL&quot;]" type="string" size="57" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC40LnRhci54ei9mcm9tL3RoaXMvbWlycm9y]]></property><property name="PHP_ASC_URL" fullname="$_SERVER[&quot;PHP_ASC_URL&quot;]" type="string" size="61" encoding="base64"><![CDATA[aHR0cHM6Ly93d3cucGhwLm5ldC9nZXQvcGhwLTcuNC40LnRhci54ei5hc2MvZnJvbS90aGlzL21pcnJvcg==]]></property><property name="PHP_SHA256" fullname="$_SERVER[&quot;PHP_SHA256&quot;]" type="string" size="64" encoding="base64"><![CDATA[MTg3M2M0Y2VmZGQzZGY5YTc4ZGNmZmIyMTk4YmJhNWMyZjA0NjRmNTVjOWM5NjA3MjBjODRkZjQ4M2ZjYTc0Yw==]]></property><property name="PHP_MD5" fullname="$_SERVER[&quot;PHP_MD5&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="HOME" fullname="$_SERVER[&quot;HOME&quot;]" type="string" size="5" encoding="base64"><![CDATA[L3Jvb3Q=]]></property><property name="PHP_SELF" fullname="$_SERVER[&quot;PHP_SELF&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_NAME" fullname="$_SERVER[&quot;SCRIPT_NAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="SCRIPT_FILENAME" fullname="$_SERVER[&quot;SCRIPT_FILENAME&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="PATH_TRANSLATED" fullname="$_SERVER[&quot;PATH_TRANSLATED&quot;]" type="string" size="15" encoding="base64"><![CDATA[L2FwcC9zY3JpcHQucGhw]]></property><property name="DOCUMENT_ROOT" fullname="$_SERVER[&quot;DOCUMENT_ROOT&quot;]" type="string" size="0" encoding="base64"><![CDATA[]]></property><property name="REQUEST_TIME_FLOAT" fullname="$_SERVER[&quot;REQUEST_TIME_FLOAT&quot;]" type="float"><![CDATA[1585149037.9217]]></property><property name="REQUEST_TIME" fullname="$_SERVER[&quot;REQUEST_TIME&quot;]" type="int"><![CDATA[1585149037]]></property><property name="argv" fullname="$_SERVER[&quot;argv&quot;]" type="array" children="1" numchildren="1"></property><property name="argc" fullname="$_SERVER[&quot;argc&quot;]" type="int"><![CDATA[1]]></property></property></response>

[1] <- context_get -i 17 -d 0 -c 2
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="17" context="2"></response>

[1] <- run -i 18
[1] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="18" status="stopping" reason="ok"></response>

[1] <- run -i 19
[1] Log closed at 2020-03-25 15:10:46

xdebug-2.log (14,325 bytes)   
script-2.php (342 bytes)   
<?php

function echoLine(string $string): void
{
    echo $string, PHP_EOL;
}

echo `php -v`;
echo "started\n";
if ($child = pcntl_fork()) {
    sleep(5);
    echoLine('hello from parent'); //breakpoint no. 1 here
    pcntl_waitpid($child, $status);
    echo "finished\n";
} else {
    echoLine('hello from child'); //breakpoint no. 2 here
}
script-2.php (342 bytes)   

derick

2020-03-25 15:25

administrator   ~0005351

It works here, see the attached video. Do you have PhpStorm's "Max. simultaneous connections" set to something higher than "1"?

debug.webm (1,139,187 bytes)   

samuel.nogueira

2020-03-25 15:46

reporter   ~0005352

Yup, during both tests 'Max. simultaneous connections' was set to 3.
However, your video showed what I was doing wrong, my PhpStorm was not listening for new connections, so it refused the incoming connection from the child process, and that is why I wasn't able to step-debug the forked process.
My confusing came from the fact that this wasn't needed in versions 2.6.1 and below.
Apologies for taking your time to make me see this, I hope at least someone finds this useful, I know my team will.

For me, issue can be closed, there is no problem after all.

Thank you!

derick

2020-03-25 15:59

administrator   ~0005353

Ah, I see that in your log now:


[1] <- run -i 12
[9] Log closed at 2020-03-25 15:10:37

[9] Log opened at 2020-03-25 15:10:37
[9] I: Connecting to configured address/port: 172.17.0.1:9000.
[9] W: Creating socket for '172.17.0.1:9000', poll success, but error: Operation now in progress (29).
[9] E: Could not connect to client. :-(
[9] Log closed at 2020-03-25 15:10:37

Before Xdebug 2.7, it only worked by chance. Both parent and child would share the same connection, and if data got out of sync in any way, which was quite easy to occur, the debugger would get mega confused. With the fixing of 0000938, it now makes a new connection per child.

If you and your team like it, perhaps you can support me working on Xdebug ;-) -> https://xdebug.org/support

Issue History

Date Modified Username Field Change
2020-03-24 18:55 samuel.nogueira New Issue
2020-03-24 18:55 samuel.nogueira File Added: Dockerfile
2020-03-24 18:55 samuel.nogueira File Added: script.php
2020-03-24 18:55 samuel.nogueira File Added: xdebug.log
2020-03-24 18:58 samuel.nogueira Note Added: 0005346
2020-03-25 11:09 derick Assigned To => derick
2020-03-25 11:09 derick Status new => feedback
2020-03-25 11:09 derick Note Added: 0005347
2020-03-25 11:58 samuel.nogueira File Added: Screencast from 25-03-2020 11:44:08.webm
2020-03-25 11:58 samuel.nogueira File Added: xdebug261.log
2020-03-25 11:58 samuel.nogueira File Added: xdebug261.Dockerfile
2020-03-25 11:58 samuel.nogueira Note Added: 0005348
2020-03-25 11:58 samuel.nogueira Status feedback => assigned
2020-03-25 12:05 derick Status assigned => feedback
2020-03-25 12:06 derick Note Added: 0005349
2020-03-25 15:13 samuel.nogueira File Added: xdebug-2.log
2020-03-25 15:13 samuel.nogueira File Added: script-2.php
2020-03-25 15:13 samuel.nogueira File Added: Screencast from 25-03-2020 15:10:32.webm
2020-03-25 15:13 samuel.nogueira Note Added: 0005350
2020-03-25 15:13 samuel.nogueira Status feedback => assigned
2020-03-25 15:25 derick File Added: debug.webm
2020-03-25 15:25 derick Note Added: 0005351
2020-03-25 15:46 samuel.nogueira Note Added: 0005352
2020-03-25 15:59 derick Status assigned => resolved
2020-03-25 15:59 derick Resolution open => no change required
2020-03-25 15:59 derick Note Added: 0005353