I recently found Xdebug for PHP and decided to try it out. It works well for debugging in the console, but for some reason, it does not work at all from the browser.
I navigate to localhost with the debugger enabled in my IDE (green bug icon in PhpStorm), while having made sure to enable the step debugger in Xdebug, yet nothing happens. All I know is that the output of xdebug_info(); tells me that the debugger is detached, which does not make any sense.
I tried to search the Internet but could not find any mention of what this status actually means. I appreciate any help that could point me in the right direction, as I am currently stuck without anything to go by.
/etc/php/8.1/mods-available/xdebug.ini
zend_extension=xdebug.so
xdebug.mode=debug
xdebug.client_host=127.0.0.1
xdebug.log=/tmp/xdebug.log
Xdebug helper (Firefox extension)
Output from xdebug_info();
Log file
[1079] Log opened at 2023-09-30 23:31:06.561542
[1079] [Config] INFO: Trigger value for 'XDEBUG_TRIGGER' not found, falling back to 'XDEBUG_SESSION'
[1079] [Config] INFO: No shared secret: Activating
[1079] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:9003.
[1079] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (through xdebug.client_host/xdebug.client_port).
[1079] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/html/index.php" language="PHP" xdebug:language_version="8.1.12-1ubuntu4.3" protocol_version="1.0" appid="1079" idekey="XDEBUG_ECLIPSE"><engine version="3.2.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2022 by Derick Rethans]]></copyright></init>
[1079] [Step Debug] <- eval -i 1 -- KHN0cmluZykoaW5pX2dldCgneGRlYnVnLmNvdmVyYWdlX2VuYWJsZScpLic7Jy5pbmlfZ2V0KCd4ZGVidWcucHJvZmlsZXJfZW5hYmxlJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfYXV0b3N0YXJ0JykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfY29ubmVjdF9iYWNrJykuJzsnLmluaV9nZXQoJ3hkZWJ1Zy5yZW1vdGVfbW9kZScpKQ==
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="1"><property type="string" size="635" encoding="base64"><![CDATA[VGhpcyBzZXR0aW5nIGhhcyBiZWVuIGNoYW5nZWQsIHNlZSB0aGUgdXBncmFkaW5nIGd1aWRlIGF0IGh0dHBzOi8veGRlYnVnLm9yZy9kb2NzL3VwZ3JhZGVfZ3VpZGUjY2hhbmdlZC14ZGVidWcuY292ZXJhZ2VfZW5hYmxlO1RoaXMgc2V0dGluZyBoYXMgYmVlbiBjaGFuZ2VkLCBzZWUgdGhlIHVwZ3JhZGluZyBndWlkZSBhdCBodHRwczovL3hkZWJ1Zy5vcmcvZG9jcy91cGdyYWRlX2d1aWRlI2NoYW5nZWQteGRlYnVnLnByb2ZpbGVyX2VuYWJsZTtUaGlzIHNldHRpbmcgaGFzIGJlZW4gY2hhbmdlZCwgc2VlIHRoZSB1cGdyYWRpbmcgZ3VpZGUgYXQgaHR0cHM6Ly94ZGVidWcub3JnL2RvY3MvdXBncmFkZV9ndWlkZSNjaGFuZ2VkLXhkZWJ1Zy5yZW1vdGVfYXV0b3N0YXJ0O1RoaXMgc2V0dGluZyBoYXMgYmVlbiBjaGFuZ2VkLCBzZWUgdGhlIHVwZ3JhZGluZyBndWlkZSBhdCBodHRwczovL3hkZWJ1Zy5vcmcvZG9jcy91cGdyYWRlX2d1aWRlI2NoYW5nZWQteGRlYnVnLnJlbW90ZV9jb25uZWN0X2JhY2s7VGhpcyBzZXR0aW5nIGhhcyBiZWVuIGNoYW5nZWQsIHNlZSB0aGUgdXBncmFkaW5nIGd1aWRlIGF0IGh0dHBzOi8veGRlYnVnLm9yZy9kb2NzL3VwZ3JhZGVfZ3VpZGUjY2hhbmdlZC14ZGVidWcucmVtb3RlX21vZGU=]]></property></response>
[1079] [Step Debug] <- feature_set -i 2 -n show_hidden -v 1
[1079] [Step Debug] -> <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>
[1079] [Step Debug] <- feature_set -i 3 -n max_depth -v 1
[1079] [Step Debug] -> <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>
[1079] [Step Debug] <- feature_set -i 4 -n max_children -v 100
[1079] [Step Debug] -> <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>
[1079] [Step Debug] <- feature_set -i 5 -n extended_properties -v 1
[1079] [Step Debug] -> <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>
[1079] [Step Debug] <- feature_set -i 6 -n notify_ok -v 1
[1079] [Step Debug] -> <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>
[1079] [Step Debug] <- feature_set -i 7 -n resolved_breakpoints -v 1
[1079] [Step Debug] -> <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>
[1079] [Step Debug] <- feature_set -i 8 -n breakpoint_include_return_value -v 1
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="8" feature="breakpoint_include_return_value" success="1"></response>
[1079] [Step Debug] <- stdout -i 9 -c 1
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="9" success="1"></response>
[1079] [Step Debug] <- status -i 10
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="status" transaction_id="10" status="starting" reason="ok"></response>
[1079] [Step Debug] <- step_into -i 11
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="11" status="break" reason="ok"><xdebug:message filename="file:///var/www/html/index.php" lineno="2"></xdebug:message></response>
[1079] [Step Debug] <- eval -i 12 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="12"><property type="bool"><![CDATA[0]]></property></response>
[1079] [Step Debug] <- eval -i 13 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="13"><property type="bool"><![CDATA[1]]></property></response>
[1079] [Step Debug] <- eval -i 14 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="14"><property type="string" size="1" encoding="base64"><![CDATA[Xw==]]></property></response>
[1079] [Step Debug] <- eval -i 15 -- KHN0cmluZykoJF9TRVJWRVJbJ1NFUlZFUl9QT1JUJ10p
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="15"><property type="string" size="2" encoding="base64"><![CDATA[ODA=]]></property></response>
[1079] [Step Debug] <- eval -i 16 -- KHN0cmluZykoJF9TRVJWRVJbJ1JFUVVFU1RfVVJJJ10p
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="16"><property type="string" size="1" encoding="base64"><![CDATA[Lw==]]></property></response>
[1079] [Step Debug] <- detach -i 17
[1079] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="17" status="stopping" reason="ok"></response>
[1079] Log closed at 2023-09-30 23:31:06.589876
Debug settings
File being debugged
Servers




