Reputation: 79
I need help regarding with my Homestead configuration. Currently I'm running a development project using Laravel/Homestead that running over VirtualBox Vagrant. I'm installed PHP 8.0.2 and Xdebug 3.0.2 and ZendOpCache v 8.0.2 But unfortunately I cannot connect my VSCODE that installed on my Windows (Both IDE and Homestead are installed on Windows)
My Homestead IP Address is 192.168.56.17 and the host is 192.168.56.1
Here is my XDebug configuration and I put the xdebug.ini on /etc/php/8.0/cli/conf.d/20-xdebug.ini
zend_extension = xdebug.so
xdebug.mode = debug
xdebug.idekey = VSCODE
xdebug.max_nesting_level = 512
xdebug.start_with_request = yes
xdebug.client_port = 9003
xdebug.client_host = 192.168.56.1
And here is my VSCODE 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": 9003,
"stopOnEntry": false,
"log": true,
"pathMappings": {"/home/vagrant/code/project" : "${workspaceRoot}"}
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 9003
}
]
}
Kindly need help regarding this
Upvotes: 2
Views: 649
Reputation: 41350
your problem is
xdebug.start_with_request = yes
just delete it and you will get your Xdebug working
BTW, after deleting it, restart you FPM like so
$ sudo service php7.4-fpm restart
and restart your browser and IDE
Upvotes: 1
Reputation: 1
I would try adding xdebug.discover_client_host = no
to the xdebug.ini. Cannot test it on windows but that works for me on linux.
Perhaps it would also be helpful adding xdebug.log = "/tmp/xdebug.log"
so you can see better what's happening there.
Upvotes: 0