How to debug Laravel project with Xdebug when using Single Page Application for front end, like Vue.js, React.js etc? Tutorials on this seems to be outdated.
I have setup Xdebug on my windows machine with Laragon nginx, PHP 8.1.2 and also installed related xdebug.dll for my PHP from Xdebug official website. But Xdebug does not connect to my PhpStorm IDE. I also installed Xdebug helper extension on Chrome which sends cookie header correctly for PhpStorm.
[12344] Log opened at 2022-04-20 19:55:22.015861
[12344] [Step Debug] INFO: Checking remote connect back address.
[12344] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[12344] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[12344] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 127.0.0.1:9003.
[12344] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: 127.0.0.1:9003. :-|
[5520] Log opened at 2022-04-20 19:55:32.343684
[5520] [Step Debug] INFO: Checking remote connect back address.
[5520] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[5520] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[5520] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 127.0.0.1:9003.
[5520] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (from REMOTE_ADDR HTTP header). :-)
[5520] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///D:/Projects/iq/iq-integrate/public/index.php" language="PHP" xdebug:language_version="8.1.2" protocol_version="1.0" appid="5520" idekey="PHPSTORM"><engine version="3.1.4"><![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>
Related
Xdebug logs are saying that he is able to connect to PhpStorm, but PhpStorm cant run the debug process.
[23] Log opened at 2023-01-11 21:16:29.141347
[23] [Step Debug] INFO: Connecting to configured address/port: host.docker.internal:9003.
[23] [Step Debug] INFO: Connected to debugging client: host.docker.internal:9003 (through xdebug.client_host/xdebug.client_port). :-)
[23] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///legacy/public/index.php" language="PHP" xdebug:language_version="8.1.7" protocol_version="1.0" appid="23"><engine version="3.1.0"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>
[20] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[20] Log closed at 2023-01-11 21:16:29.451767
Application is in monorepo in folder legacy/, run by docker via 8000 port.
PHP 8.1.7 (cli) (built: Jun 9 2022 23:29:02) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.7, Copyright (c) Zend Technologies
with Xdebug v3.1.0, Copyright (c) 2002-2021, by Derick Rethans
For some reason Xdebug is not connecting to the port that I have specified for it.
.ini file contents:
xdebug.mode=debug
xdebug.log=/var/log/xdebug/xdebug.log
xdebug.start_with_request=yes
xdebug.discover_client_host=1
xdebug.client_port=10000
PhpStorm settings:
I used to have my PhpStorm set to listen on port 9003, but changed it in an attempt to resolve the issue.
sudo lsof -i :9003:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
phpstorm 8680 lodewykduminy 71u IPv6 0x994c1e5e6b18981f 0t0 TCP *:9003 (LISTEN)
sudo lsof -i :10000 does not show anything listening on the port.
When navigating to a page that would cause a breakpoint to be hit, the following is logged:
[122] Log opened at 2022-01-19 00:46:24.792450
[122] [Step Debug] INFO: Checking remote connect back address.
[122] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[122] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[122] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 172.18.0.1:10000.
[122] [Step Debug] WARN: Creating socket for '172.18.0.1:10000', poll success, but error: Operation in progress (29).
[122] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: localhost:10000. :-|
[122] [Step Debug] WARN: Creating socket for 'localhost:10000', poll success, but error: Operation in progress (29).
[122] [Step Debug] WARN: Creating socket for 'localhost:10000', connect: Address not available.
[122] [Step Debug] ERR: Could not connect to debugging client. Tried: 172.18.0.1:10000 (from REMOTE_ADDR HTTP header), localhost:10000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[122] [Step Debug] INFO: Checking remote connect back address.
[122] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[122] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[122] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 172.18.0.1:10000.
[122] [Step Debug] WARN: Creating socket for '172.18.0.1:10000', poll success, but error: Operation in progress (29).
[122] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: localhost:10000. :-|
[122] [Step Debug] WARN: Creating socket for 'localhost:10000', poll success, but error: Operation in progress (29).
[122] [Step Debug] WARN: Creating socket for 'localhost:10000', connect: Address not available.
[122] [Step Debug] ERR: Could not connect to debugging client. Tried: 172.18.0.1:10000 (from REMOTE_ADDR HTTP header), localhost:10000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[122] [Step Debug] INFO: Checking remote connect back address.
[122] [Step Debug] INFO: Checking header 'HTTP_X_FORWARDED_FOR'.
[122] [Step Debug] INFO: Checking header 'REMOTE_ADDR'.
[122] [Step Debug] INFO: Client host discovered through HTTP header, connecting to 172.18.0.1:10000.
[122] [Step Debug] WARN: Creating socket for '172.18.0.1:10000', poll success, but error: Operation in progress (29).
[122] [Step Debug] WARN: Could not connect to client host discovered through HTTP headers, connecting to configured address/port: localhost:10000. :-|
[122] [Step Debug] WARN: Creating socket for 'localhost:10000', poll success, but error: Operation in progress (29).
[122] [Step Debug] WARN: Creating socket for 'localhost:10000', connect: Address not available.
[122] [Step Debug] ERR: Could not connect to debugging client. Tried: 172.18.0.1:10000 (from REMOTE_ADDR HTTP header), localhost:10000 (fallback through xdebug.client_host/xdebug.client_port) :-(
[122] Log closed at 2022-01-19 00:46:25.492820
Not sure what my next step should be.
(EDIT)
I've updated my docker setup to hold port 10000 in an attempt to resolve the issue:
Unfortunately the logs remain the same, with the following being show when I run sudo lsof -i :10000:
Full xdebug_info():
I am trying to debug PHP with Xdebug in listening mode in VS Code.
For some commands I receive the unspecific error evaluating code, which tells me that something went wrong, but I don't know what. For example, mkdir($dir_path, 711, true); sometimes returns this error (when apparently something went wrong), while file_exists($dir_path); works (returning true or false). I presume this is a case of permission denied for mkdir(), but I would expect the error message to tell me about it.
Another example producing the error is by echo "str";.
There has been a similar issue opened up on this, but I don't understand the answer. Even when using semicolons at the end, I receive the error. And mkdir() should return true or false.
Version information:
PHP Version 7.2.34-26+ubuntu20.04.1+deb.sury.org+1
Visual Studio Code 1.6.2
Xdebug 3.1.1
I have no variables on the watch list, as suggested here and here.
Edit
Here the Xdebug log (excerpt):
[855784] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="dbgp://stdin" language="PHP" xdebug:language_version="7.2.34-26+ubuntu20.04.1+deb.sury.org+1" protocol_version="1.0" appid="855784"><engine version="3.1.1"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>
[855784] [Step Debug] <- feature_set -i 1 -n resolved_breakpoints -v 1
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="resolved_breakpoints" success="1"></response>
[855784] [Step Debug] <- feature_set -i 2 -n notify_ok -v 1
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="notify_ok" success="1"></response>
[855784] [Step Debug] <- feature_set -i 3 -n extended_properties -v 1
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="extended_properties" success="1"></response>
[855784] [Step Debug] <- breakpoint_set -i 6 -t line -f file:///home/myname/path/app/helpers/ImageHelper.php -n 471
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="693520003" resolved="unresolved"></response>
[855784] [Step Debug] <- breakpoint_set -i 7 -t line -f file:///home/myname/path/app/helpers/ImageHelper.php -n 579
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="693520004" resolved="unresolved"></response>
[855784] [Step Debug] <- run -i 8
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="8" status="stopping" reason="ok"></response>
[855784] [Step Debug] <- stop -i 9
[855784] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="9" status="stopped" reason="ok"></response>
I am running Ubuntu 20.04 in WSL2. My Xdebug is configured and triggers PhpStorm breakpoints when browsing the local dev site on chrome, just as it should.
However when running PHP scripts through CLI (php test.php) PhpStorm notices the connection and halts but there is no breakpoints, I cannot interact, nothing happens.
Xdebug Settings:
zend_extension = /usr/lib/php/20190902/xdebug.so
xdebug.log = "/var/www/html/test.log"
xdebug.mode=debug
xdebug.client_host=172.28.192.1
xdebug.client_port=9000
;xdebug.idekey=PHPSTORM
xdebug.start_with_request=yes
xdebug.log_level = 7
Output of Xdebug log when trying to run script in CLI.
[14214] Log opened at 2021-05-15 00:41:14.790013
[14214] [Step Debug] INFO: Connecting to configured address/port: 172.28.192.1:9000.
[14214] [Step Debug] INFO: Connected to debugging client: 172.28.192.1:9000 (through xdebug.client_host/xdebug.client_port). :-)
[14214] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///var/www/dev_test/test/test.php" language="PHP" xdebug:language_version="7.4.3" protocol_version="1.0" appid="14214"><engine version="3.0.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>
[14214] [Step Debug] <- feature_set -i 1 -n show_hidden -v 1
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="1" feature="show_hidden" success="1"></response>
[14214] [Step Debug] <- feature_set -i 2 -n max_depth -v 1
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="2" feature="max_depth" success="1"></response>
[14214] [Step Debug] <- feature_set -i 3 -n max_children -v 100
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="3" feature="max_children" success="1"></response>
[14214] [Step Debug] <- feature_set -i 4 -n extended_properties -v 1
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="4" feature="extended_properties" success="1"></response>
[14214] [Step Debug] <- feature_set -i 5 -n notify_ok -v 1
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="feature_set" transaction_id="5" feature="notify_ok" success="1"></response>
[14214] [Step Debug] <- feature_set -i 6 -n resolved_breakpoints -v 1
[14214] [Step Debug] -> <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>
[14214] [Step Debug] <- stdout -i 7 -c 1
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stdout" transaction_id="7" success="1"></response>
[14214] [Step Debug] <- status -i 8
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="status" transaction_id="8" status="starting" reason="ok"></response>
[14214] [Step Debug] <- step_into -i 9
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_into" transaction_id="9" status="break" reason="ok"><xdebug:message filename="file:///var/www/dev_test/test/test.php" lineno="2"></xdebug:message></response>
[14214] [Step Debug] <- eval -i 10 -- aXNzZXQoJF9TRVJWRVJbJ1BIUF9JREVfQ09ORklHJ10p
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="10"><property type="bool"><![CDATA[0]]></property></response>
[14214] [Step Debug] <- eval -i 11 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9OQU1FJ10p
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="11"><property type="bool"><![CDATA[0]]></property></response>
[14214] [Step Debug] <- eval -i 12 -- aXNzZXQoJF9TRVJWRVJbJ1NTSF9DT05ORUNUSU9OJ10p
[14214] [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>
[14214] [Step Debug] <- eval -i 13 -- aXNzZXQoJF9TRVJWRVJbJ1NFUlZFUl9BRERSJ10p
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="13"><property type="bool"><![CDATA[0]]></property></response>
[14214] [Step Debug] <- breakpoint_set -i 14 -t line -f file:////wsl$/Ubuntu-20.04/var/www/dev_test/test/test.php -n 10
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="14" id="142140001" resolved="unresolved"></response>
[14214] [Step Debug] <- stack_get -i 15
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="15"><stack where="{main}" level="0" type="file" filename="file:///var/www/dev_test/test/test.php" lineno="2"></stack></response>
[14214] [Step Debug] <- stack_get -i 16
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="16"><stack where="{main}" level="0" type="file" filename="file:///var/www/dev_test/test/test.php" lineno="2"></stack></response>
[14214] [Step Debug] <- context_names -i 17
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="17"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>
[14214] [Step Debug] <- eval -i 18 -- JEdMT0JBTFNbJ0lERV9FVkFMX0NBQ0hFJ11bJzJlN2M3ZjYzLTFjNDEtNDgwMS04ZDA2LWMyYzIwZGQ4MzZhNCddPSR1X29iag==
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="18"><property type="null"></property></response>
[14214] [Step Debug] <- context_get -i 19 -d 0 -c 0
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="19" context="0"><property name="$IDE_EVAL_CACHE" fullname="$IDE_EVAL_CACHE" type="array" children="1" numchildren="1" page="0" pagesize="100"><property name="2e7c7f63-1c41-4801-8d06-c2c20dd836a4" fullname="$IDE_EVAL_CACHE["2e7c7f63-1c41-4801-8d06-c2c20dd836a4"]" type="null"></property></property><property name="$db" fullname="$db" type="uninitialized"></property><prope
[14214] [Step Debug] <- context_get -i 20 -d 0 -c 1
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="20" 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="0" numchildren="0" page="0" pagesize="100"></property><property name="$_FILES" fullname="$_FILES" type="array" children="0" numchildren="0" page="0" pagesize="100"></property><pro
[14214] [Step Debug] <- run -i 21
[14214] [Step Debug] -> <stream xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" type="stdout" encoding="base64"><![CDATA[CkRlYnVnIEJ1ZmZlcgo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ck1lbW9yeSBVc2FnZTogNDY3ODY0MCBCdWZmZXIgU2l6ZTogNwotLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tCkRFQlVHIFtMMDM5OV0gWzEzNTEybXNdOiBHTE9CQUw6IFVSSTogdGVzdC5waHAgSVAgQWRkcmVzczogCkRFQlVHIFtMMDQwMF0gWzEzNTEy
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="21" status="stopping" reason="ok"></response>
[14214] [Step Debug] <- detach -i 22
[14214] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="detach" transaction_id="22" status="stopping" reason="ok"></response>
[14214] Log closed at 2021-05-15 00:41:28.327542
I am completely new on PHP and Xdebug. I have installed XAMPP on Windows 10 and I have a running application on PHP.
So I wanted to trace the application on Visual Studio Code to understand it, I used the Xdebug. I did the following:
I download the appropriate php-xdebug.dll (according to PHP version, on xdebug.org/wizard) and place it on PHP directory of XAMPP.
I installed the PHP debug extension and added these lines:
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 9000
Add this line to json:
"runtimeExecutable": "C:\\Xampp\\PHP\\php.exe"
Restart the Apache service in XAMPP.
Now I started the application and put some breakpoint to trace the application. It worked fine for about 4 or 5 hours, without any problem. But after that it stop working.
When I put the breakpoint it enters the breakpoint. When I press "press into" button, nothing happens and it seems Xdebug not working.
How can I check what is the problem with Wdebug?
EDIT:
This is what I found. This is a very simple code which I want to trace:
<?php
$a=100;
$b=200;
echo $a."<br/>";
echo $b."<br/>";
echo $a+$b;
If I place in the root of htdocs, the Xdebug won't work any more, but if I put in a subdirectory inside htdocs then the debug works fine.
This the result in Xdebug log file:
[8668] Log opened at 2262-04-09 09:08:59.927045
[8668] [Step Debug] INFO: Connecting to configured address/port: localhost:9000.
[8668] [Step Debug] INFO: Connected to debugging client: localhost:9000 (through xdebug.client_host/xdebug.client_port). :-)
[8668] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="file:///C:/xampp/htdocs/index.php" language="PHP" xdebug:language_version="7.2.34" protocol_version="1.0" appid="8668"><engine version="3.0.4"><![CDATA[Xdebug]]></engine><author><![CDATA[Derick Rethans]]></author><url><![CDATA[https://xdebug.org]]></url><copyright><![CDATA[Copyright (c) 2002-2021 by Derick Rethans]]></copyright></init>
[8668] [Step Debug] <- breakpoint_list -i 1
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="1"></response>
[8668] [Step Debug] <- breakpoint_list -i 2
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="2"></response>
[8668] [Step Debug] <- breakpoint_list -i 3
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="3"></response>
[8668] [Step Debug] <- breakpoint_list -i 4
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="4"></response>
[8668] [Step Debug] <- breakpoint_list -i 5
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="5"></response>
[8668] [Step Debug] <- breakpoint_list -i 6
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="6"></response>
[8668] [Step Debug] <- breakpoint_set -i 7 -t line -f file:///c:/xampp/htdocs/test/1.php -n 3
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="86680001"></response>
[8668] [Step Debug] <- breakpoint_set -i 8 -t line -f file:///c:/xampp/htdocs/1.php -n 3
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="8" id="86680002"></response>
[8668] [Step Debug] <- breakpoint_set -i 9 -t line -f file:///c:/xampp/htdocs/app/hmi/API/addline.php -n 16
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="9" id="86680003"></response>
[8668] [Step Debug] <- breakpoint_set -i 10 -t line -f file:///c:/xampp/htdocs/app/hmi/API/addorderstation.php -n 17
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="10" id="86680004"></response>
[8668] [Step Debug] <- breakpoint_set -i 11 -t line -f file:///c:/xampp/htdocs/app/hmi/API/addstation.php -n 14
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="11" id="86680005"></response>
[8668] [Step Debug] <- breakpoint_set -i 12 -t line -f file:///c:/xampp/htdocs/index.php -n 3
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="12" id="86680006"></response>
[8668] [Step Debug] <- breakpoint_set -i 13 -t line -f file:///c:/xampp/htdocs/index.php -n 17
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="13" id="86680007"></response>
[8668] [Step Debug] <- breakpoint_list -i 14
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="14"><breakpoint type="line" filename="file:///C:/xampp/htdocs/app/hmi/API/addstation.php" lineno="14" state="enabled" hit_count="0" hit_value="0" id="86680005"></breakpoint><breakpoint type="line" filename="file:///C:/xampp/htdocs/app/hmi/API/addorderstation.php" lineno="17" state="enabled" hit_count="0" hit_value="0" id="86680004"></breakpoint><breakpoint type="line" filena
[8668] [Step Debug] <- breakpoint_list -i 15
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_list" transaction_id="15"><breakpoint type="line" filename="file:///C:/xampp/htdocs/app/hmi/API/addstation.php" lineno="14" state="enabled" hit_count="0" hit_value="0" id="86680005"></breakpoint><breakpoint type="line" filename="file:///C:/xampp/htdocs/app/hmi/API/addorderstation.php" lineno="17" state="enabled" hit_count="0" hit_value="0" id="86680004"></breakpoint><breakpoint type="line" filena
[8668] [Step Debug] <- breakpoint_set -i 16 -t exception -x *
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="16" id="86680008"></response>
[8668] [Step Debug] <- run -i 17
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="run" transaction_id="17" status="break" reason="ok"><xdebug:message filename="file:///C:/xampp/htdocs/index.php" lineno="3"></xdebug:message></response>
[8668] [Step Debug] <- stack_get -i 18
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stack_get" transaction_id="18"><stack where="{main}" level="0" type="file" filename="file:///C:/xampp/htdocs/index.php" lineno="3"></stack></response>
[8668] [Step Debug] <- eval -i 19 -- KCRh
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="19" status="break" reason="ok"><error code="206"><message><![CDATA[error evaluating code]]></message></error></response>
[8668] [Step Debug] <- eval -i 20 -- Y2hyKCRhKQ==
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="20"><property type="string" size="1" encoding="base64"><![CDATA[AA==]]></property></response>
[8668] [Step Debug] <- eval -i 21 -- JGE=
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="21"><property type="null"></property></response>
[8668] [Step Debug] <- eval -i 22 -- JF9SRVFVRVNUWydQQVJBTVMnXQ==
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="22"><property type="null"></property></response>
[8668] [Step Debug] <- eval -i 23 -- JHBhcmFtcw==
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="eval" transaction_id="23"><property type="null"></property></response>
[8668] [Step Debug] <- context_names -i 24 -d 0
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_names" transaction_id="24"><context name="Locals" id="0"></context><context name="Superglobals" id="1"></context><context name="User defined constants" id="2"></context></response>
[8668] [Step Debug] <- context_get -i 25 -d 0 -c 0
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="context_get" transaction_id="25" context="0"><property name="$a" fullname="$a" type="uninitialized"></property><property name="$b" fullname="$b" type="uninitialized"></property></response>
[8668] [Step Debug] <- step_over -i 26
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="step_over" transaction_id="26" status="stopping" reason="ok"></response>
[8668] [Step Debug] <- stop -i 27
[8668] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="stop" transaction_id="27" status="stopped" reason="ok"></response>
[8668] Log closed at 2262-04-09 09:08:59.927045
You can check what Xdebug does, by creating a log with the php.ini setting xdebug.log=c:\temp\xdebug.log—you might have to change the path if the web server or PHP can't write to that. The log will list all debug connection attempts, list potential connection issues, and if a connection is made, the communication. You can check whether the fileuri XML attribute of the <init tag matches what is set by the breakpoint_set commands that the IDE ought to send.
The only I could do , I changed the website Folder from htdocs to htdocs/Projects. and everything worked fine after that. I couldn't find the reason