-
Notifications
You must be signed in to change notification settings - Fork 17
Description
Hi, today I was able to set up Zed to listen to Xdebug (running inside a docker container). I'm very happy, but there were some issues along the way. One thing that got me stumped was that in the configuration it was said that the "program" key was required, but inserting that key, both with the default value and another valid value, always broke my configuration.
My current configuration is:
{
"adapter": "Xdebug",
"label": "Xdebug su porta 9003",
"request": "launch",
"hostname": "0.0.0.0",
"port": 9003,
"pathMappings": {
"/var/www/html/": "/full/path/to/project/"
}
}
With this configuration, the debugger starts and receive connections from xdebug when needed. However, Zed is showing a warning saying that the "program" key is missing.
When I try to add "program": "${file}" (the default value), the debugger fails saying that the file was not found, regardless of the file I have open.
When I instead tried to add a new file "test.php" and set "program": "public/test.php", the debugger starts and runs the file, but then it immediately ends.
It seems to me that the presence of the "program" key actually changes the behaviour of the debugger
- with "program" key: the debugger starts listening on the port, and then tries to run the file with the local php (which in theory should connect to the port opened by the debugger)
- without the key: the debugger starts listening on the port and is ready for external calls, like when I do a request from Postman or from the browser
Is my understanding correct? Because in that case, the "program" key isn't actually required. In some circumstances (like mine) it's actually wrong to put it in, since in my situation the local php installation is not used for the debugging and the debugger connection comes from a docker container.
Thanks for all the work you've put into this project