Reputation: 21
I need Xdebug to keep track of incoming data, where it goes, etc. Since I run (raise up) the Drupal site using docksal, I set it up according to the instructions https://docs.docksal.io/tools/xdebug/#phpstorm
I wrote the command:
fin config set --env=local XDEBUG_ENABLED=1
And in the file docksal-local.env
changed to:
XDEBUG_ENABLED="1"
I wrote the command:
fin project start
I checked Xdebug:
fin exec php-v | grep -i xdebug
And received:
with Xdebug v3.1.5, Copyright (c) 2002-2022, by Derick Rethans
I am running PHPUnit Kernel and Unir test, I put a breakpoint on some line. I clicked the Start Listening for PHP Debug Connections button list.
I went to the site page in the browser, updated it and returned to PhpStorm but nothing happened. What do I need to do to make Xdebug work?
Getting this error :
[Debug] Time-out connecting to debugging client, waited: 200 ms. Tried: 192.168.64.1:9000 (through xdebug.client_host/xdebug.client_port) :-(
Upvotes: 1
Views: 244
Reputation: 23
Make sure your file looks like this:
php.ini :
[XDebug]
zend_extension = php_xdebug-3.1.5-vc15-x86_64.dll
xdebug.mode = debug,develop
xdebug.discover_client_host = yes
xdebug.log_level = 0
xdebug.log = "%sprogdir%/userdata/temp/xdebug/log.txt"
xdebug.start_with_request = yes
xdebug.idekey = VSCODE
launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 9003,
"env": {
"XDEBUG_CONFIG": "log_level=7",
}
}
]
}
Upvotes: 0