'Laravel 8 - XDebugger not working on breakpoint
I am trying to get my xdebugger to work, I am using php artisan serve so I don't know if thats the issue.
launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 8000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 8000,
"serverReadyAction": {
"pattern": "Development Server \\(http://localhost:([0-9]+)\\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
I added different things on my php.ini like changin the port
[xDebug]
xdebug.remote_enable =1
xdebug.remote_autostart =1
zend_extension = "D:\Software\xampp\php\ext\php_xdebug.dll"
xdebug.mode = debug
xdebug.start_with_request = yes
xdebug.client_port = 8000
xdebug.client_host = "127.0.0.1"
xdebug.log = "D:\log\xdebug.log"
xdebug.idekey = VSCODE
this is my xdebug.log I am using this URL http://127.0.0.1:8000/brand/all if that helps.
I dont know what am I doing wrong.
xdebug.log
[2704] Log opened at 2022-02-25 11:48:26.092657
[2704] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:8000.
[2704] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:8000 (through xdebug.client_host/xdebug.client_port). :-)
[2704] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="dbgp://stdin" language="PHP" xdebug:language_version="7.4.23" protocol_version="1.0" appid="2704" idekey="VSCODE"><engine version="3.1.3"><![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>
[5008] Log opened at 2022-02-25 11:48:26.345514
[5008] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:8000.
[5008] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:8000 (through xdebug.client_host/xdebug.client_port). :-)
[5008] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="dbgp://stdin" language="PHP" xdebug:language_version="7.4.23" protocol_version="1.0" appid="5008" idekey="VSCODE"><engine version="3.1.3"><![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>
[632] Log opened at 2022-02-25 11:48:26.351843
[632] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:8000.
[632] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:8000 (through xdebug.client_host/xdebug.client_port). :-)
[632] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="dbgp://stdin" language="PHP" xdebug:language_version="7.4.23" protocol_version="1.0" appid="632" idekey="VSCODE"><engine version="3.1.3"><![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>
[2704] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[2704] Log closed at 2022-02-25 11:48:26.804345
[632] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[632] Log closed at 2022-02-25 11:48:27.031764
[5008] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" status="stopping" reason="ok"></response>
[5008] Log closed at 2022-02-25 11:48:27.054677
When i change it back to port 9003 (the php.ini and launch.json) this is the log
[13972] Log opened at 2022-02-25 11:57:26.489494
[13972] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:9003.
[11080] Log opened at 2022-02-25 11:57:26.489363
[11080] [Step Debug] INFO: Connecting to configured address/port: 127.0.0.1:9003.
[13972] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (through xdebug.client_host/xdebug.client_port). :-)
[13972] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="dbgp://stdin" language="PHP" xdebug:language_version="7.4.23" protocol_version="1.0" appid="13972" idekey="VSCODE"><engine version="3.1.3"><![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>
[13972] [Step Debug] <- feature_set -i 1 -n resolved_breakpoints -v 1
[13972] [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>
[11080] [Step Debug] INFO: Connected to debugging client: 127.0.0.1:9003 (through xdebug.client_host/xdebug.client_port). :-)
[11080] [Step Debug] -> <init xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" fileuri="dbgp://stdin" language="PHP" xdebug:language_version="7.4.23" protocol_version="1.0" appid="11080" idekey="VSCODE"><engine version="3.1.3"><![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>
[13972] [Step Debug] <- feature_set -i 2 -n notify_ok -v 1
[13972] [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>
[11080] [Step Debug] <- feature_set -i 1 -n resolved_breakpoints -v 1
[11080] [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>
[13972] [Step Debug] <- feature_set -i 3 -n extended_properties -v 1
[13972] [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>
[11080] [Step Debug] <- feature_set -i 2 -n notify_ok -v 1
[11080] [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>
[13972] [Step Debug] <- breakpoint_set -i 4 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 22
[11080] [Step Debug] <- feature_set -i 3 -n extended_properties -v 1
[11080] [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>
[13972] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" id="139720001" resolved="unresolved"></response>
[11080] [Step Debug] <- breakpoint_set -i 4 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 22
[11080] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="4" id="110800001" resolved="unresolved"></response>
[13972] [Step Debug] <- breakpoint_set -i 5 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 48
[13972] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="139720002" resolved="unresolved"></response>
[11080] [Step Debug] <- breakpoint_set -i 5 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 48
[11080] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="5" id="110800002" resolved="unresolved"></response>
[13972] [Step Debug] <- breakpoint_set -i 6 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 59
[13972] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="139720003" resolved="unresolved"></response>
[11080] [Step Debug] <- breakpoint_set -i 6 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 59
[11080] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="6" id="110800003" resolved="unresolved"></response>
[13972] [Step Debug] <- breakpoint_set -i 7 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 70
[13972] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="139720004" resolved="unresolved"></response>
[11080] [Step Debug] <- breakpoint_set -i 7 -t line -f file:///d:/Software/xampp/htdocs/Laravel8/basic/app/Http/Controllers/BrandController.php -n 70
[11080] [Step Debug] -> <response xmlns="urn:debugger_protocol_v1" xmlns:xdebug="https://xdebug.org/dbgp/xdebug" command="breakpoint_set" transaction_id="7" id="110800004" resolved="unresolved"></response>
[13972] [Step Debug] <- run -i 8
[11080] [Step Debug] <- run -i 8
[13972] [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>
[13972] [Step Debug] <- stop -i 9
[13972] [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>
[13972] Log closed at 2022-02-25 11:57:27.218598
[11080] [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>
[11080] [Step Debug] <- stop -i 9
[11080] [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>
[11080] Log closed at 2022-02-25 11:57:27.253455
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

