Open TacticsJan opened 2 years ago
I also tried
PHP_XDEBUG_REMOTE_HOST: 10.0.75.1
PHPSTORM is allowed in my firewall and I have added
0.0.0.0 localhost 10.0.75.1 localhost
to my host file
Ok, implementing the path mapping gave me the same result for both 10.0.75.1 and default as host
[86] Log opened at 2021-12-30 15:46:59
[86] I: Connecting to configured address/port: 10.0.75.1:9000.
[86] E: Time-out connecting to client (Waited: 200 ms). :-(
[86] Log closed at 2021-12-30 15:47:00
[85] Log opened at 2021-12-30 15:51:00
[85] I: Connecting to configured address/port: localhost:9000.
[85] I: Connected to client. :-)
[85] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/web/admin_dev.php" language="PHP" xdebug:language_version="7.4.11" protocol_version="1.0" appid="85" idekey="wodby"><engine version="2.9.6"><![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>
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[85] Log closed at 2021-12-30 15:51:14
[86] Log opened at 2021-12-30 15:53:33
[86] I: Connecting to configured address/port: localhost:9000.
[86] I: Connected to client. :-)
[86] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/web/admin_dev.php" language="PHP" xdebug:language_version="7.4.11" protocol_version="1.0" appid="86" idekey="wodby"><engine version="2.9.6"><![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>
[86] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[86] Log closed at 2021-12-30 15:53:37
[85] Log opened at 2021-12-30 15:53:48
[85] I: Connecting to configured address/port: localhost:9000.
[85] I: Connected to client. :-)
[85] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/web/admin_dev.php" language="PHP" xdebug:language_version="7.4.11" protocol_version="1.0" appid="85" idekey="wodby"><engine version="2.9.6"><![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>
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[85] Log closed at 2021-12-30 15:53:51
But using host.docker.internal gave me the following output in the logs. Still not opening my IDE though
[85] Log opened at 2021-12-30 15:59:31
[85] I: Connecting to configured address/port: host.docker.internal:9000.
[85] I: Connected to client. :-)
[85] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/web/admin_dev.php" language="PHP" xdebug:language_version="7.4.11" protocol_version="1.0" appid="85" idekey="wodby"><engine version="2.9.6"><![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>
[85] <- eval -i 1 -- KHN0cmluZykoaW5pX2dldCgneGRlYnVnLmNvdmVyYWdlX2VuYWJsZScpLic7Jy5pbmlfZ2V0KCd4ZGVidWcucHJvZmlsZXJfZW5hYmxlJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfYXV0b3N0YXJ0JykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfY29ubmVjdF9iYWNrJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfbW9kZScpKQ==
[85] -> <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[MTswOzE7MDtyZXE=]]></property></response>
[85] <- feature_set -i 2 -n show_hidden -v 1
[85] -> <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>
[85] <- feature_set -i 3 -n max_depth -v 1
[85] -> <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>
[85] <- feature_set -i 4 -n max_children -v 100
[85] -> <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>
[85] <- feature_set -i 5 -n extended_properties -v 1
[85] -> <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>
[85] <- feature_set -i 6 -n notify_ok -v 1
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="6" feature="notify_ok" success="1"></response>
[85] <- feature_set -i 7 -n resolved_breakpoints -v 1
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="7" feature="resolved_breakpoints" success="1"></response>
[85] <- stdout -i 8 -c 1
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="8" success="1"></response>
[85] <- status -i 9
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="status" transaction_id="9" status="starting" reason="ok"></response>
[85] <- step_into -i 10
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="10" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/web/admin_dev.php" lineno="8"></xdebug:message></response>
[85] <- eval -i 11 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="11"><property type="bool"><![CDATA[1]]></property></response>
[85] <- eval -i 12 -- KHN0cmluZykoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="12"><property type="string" size="18" encoding="base64"><![CDATA[c2VydmVyTmFtZT1kZWZhdWx0]]></property></response>
[85] <- stack_get -i 13
[85] -> <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:///var/www/html/web/admin_dev.php" lineno="8"></stack></response>
[85] <- run -i 14
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/src/config/bootstrap.php" lineno="9" type="Warning"><![CDATA[include(/var/www/html/src/../.env.local.php): failed to open stream: No such file or directory]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/src/config/bootstrap.php" lineno="9" type="Warning"><![CDATA[include(): Failed opening '/var/www/html/src/../.env.local.php' for inclusion (include_path='.:/usr/local/lib/php')]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/contracts/Deprecation/function.php" lineno="25" type="Deprecated"><![CDATA[Since symfony/dotenv 5.1: Passing a boolean to the constructor of "Symfony\Component\Dotenv\Dotenv" is deprecated, use "Dotenv::usePutenv()".]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/contracts/Deprecation/function.php" lineno="25" type="Deprecated"><![CDATA[Since symfony/framework-bundle 5.3: The "session.storage.native" service is deprecated, use "session.storage.factory.native" instead.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/contracts/Deprecation/function.php" lineno="25" type="Deprecated"><![CDATA[Since symfony/framework-bundle 5.3: The "session.storage.metadata_bag" service is deprecated, create your own "session.storage.factory" instead.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/contracts/Deprecation/function.php" lineno="25" type="Deprecated"><![CDATA[Since symfony/framework-bundle 5.3: The "session.storage.factory.service" service is deprecated, use "session.storage.factory.native", "session.storage.factory.php_bridge" or "session.storage.factory.mock_file" instead.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/tactics/symfony/lib/vendor/creole/Creole.php" lineno="315" type="Notice"><![CDATA[Undefined index: port]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/symfony/src/Symfony/Component/ErrorHandler/DebugClassLoader.php" lineno="325" type="Deprecated"><![CDATA[Method "Psr\Cache\CacheItemInterface::getKey()" might add "string" as a native return type declaration in the future. Do the same in implementation "Cache\Adapter\Common\CacheItem" now to avoid errors or add an explicit @return annotation to suppress this message.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/symfony/src/Symfony/Component/ErrorHandler/DebugClassLoader.php" lineno="325" type="Deprecated"><![CDATA[Method "Psr\Cache\CacheItemInterface::set()" might add "static" as a native return type declaration in the future. Do the same in implementation "Cache\Adapter\Common\CacheItem" now to avoid errors or add an explicit @return annotation to suppress this message.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/symfony/src/Symfony/Component/ErrorHandler/DebugClassLoader.php" lineno="325" type="Deprecated"><![CDATA[Method "Psr\Cache\CacheItemInterface::get()" might add "mixed" as a native return type declaration in the future. Do the same in implementation "Cache\Adapter\Common\CacheItem" now to avoid errors or add an explicit @return annotation to suppress this message.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/symfony/src/Symfony/Component/ErrorHandler/DebugClassLoader.php" lineno="325" type="Deprecated"><![CDATA[Method "Psr\Cache\CacheItemInterface::isHit()" might add "bool" as a native return type declaration in the future. Do the same in implementation "Cache\Adapter\Common\CacheItem" now to avoid errors or add an explicit @return annotation to suppress this message.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/symfony/src/Symfony/Component/ErrorHandler/DebugClassLoader.php" lineno="325" type="Deprecated"><![CDATA[Method "Psr\Cache\CacheItemInterface::expiresAt()" might add "static" as a native return type declaration in the future. Do the same in implementation "Cache\Adapter\Common\CacheItem" now to avoid errors or add an explicit @return annotation to suppress this message.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/symfony/src/Symfony/Component/ErrorHandler/DebugClassLoader.php" lineno="325" type="Deprecated"><![CDATA[Method "Psr\Cache\CacheItemInterface::expiresAfter()" might add "static" as a native return type declaration in the future. Do the same in implementation "Cache\Adapter\Common\CacheItem" now to avoid errors or add an explicit @return annotation to suppress this message.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/vendor/symfony/contracts/Deprecation/function.php" lineno="25" type="Deprecated"><![CDATA[Since symfony/security-core 5.4: Not setting the 5th argument of "Symfony\Component\Security\Core\Authorization\AuthorizationChecker::__construct" to "false" is deprecated.]]></xdebug:message></notify>
[85] -> <notify xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" name="error"><xdebug:message filename="file:///var/www/html/apps/admin/modules/aanvraag/templates/listSuccess.php" lineno="216" type="Notice"><![CDATA[Undefined variable: zoekNoodAanvragen]]></xdebug:message></notify>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[Q2FjaGUtQ29udHJvbDogbWF4LWFnZT0wLCBtdXN0LXJldmFsaWRhdGUsIHByaXZhdGU=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[RGF0ZTogVGh1LCAzMCBEZWMgMjAyMSAxNTo1OTo0NSBHTVQ=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[Q29udGVudC1UeXBlOiB0ZXh0L2h0bWw7IGNoYXJzZXQ9dXRmLTg=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[WC1Sb2JvdHMtVGFnOiBub2luZGV4]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[RXhwaXJlczogVGh1LCAzMCBEZWMgMjAyMSAxNTo1OTo0NSBHTVQ=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[QWNjZXNzLUNvbnRyb2wtQWxsb3ctT3JpZ2luOiAq]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[QWNjZXNzLUNvbnRyb2wtRXhwb3NlLUhlYWRlcnM6ICo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[DQo=]]></stream>
[85] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![==]]></stream>
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="14" status="stopping" reason="ok"></response>
[85] <- eval -i 15 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzY5MmI1M2YwLTgxMjgtNDUzOS1hYjU2LTExYWQ4OWM5ZGZlMiddPWVycm9yX3JlcG9ydGluZygpOw==
[85] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="15"><error code="5"><message><![CDATA[command is not available]]></message></error></response>
[85] Log closed at 2021-12-30 15:59:45
I'm seeing a lot of deprecation notices but these should not stop me from using XDebug right? Note that I'm new to using a debug tool and am just trying to figure this out on my own.
oh, by the way, I've linked the issue that was for the previous xdebug major version, since then a lot of env vars have changed, see https://github.com/wodby/php/blob/master/8/templates/docker-php-ext-xdebug.ini.tmpl and https://github.com/wodby/docker4php/blob/master/docker-compose.yml#L41-L47
Codebase
Mounted codebase
Host OS
Windows 10
Docker info output
Docker compose file
Logs output
traefik log when I hit the page with my breakpoint
xdebug log with default remote host or remote host pointing to '127.19.0.1', which is basically the same since default value is localhost?
XDebug log when using host.docker.internal (suggestion I found somewhere online)
Before adding remote_connect_back=0 I always had following output in log
I have read a lot of other issues, SO threads but no answer seems really definitive. I've been trying to set this up for too long now which is sad because the docs make it seem like a simple plug and play setup. I really hope someone can help to clear up this issue.