-
-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unix socket not working and no xdebug.log #806
Comments
Hi. Also, this comes to mind from Xdebug documentation:
Regarding your docker issues. This is usually a problem one has to understand. If you are running VSCode on the host then your dockerized PHP process must connect to it. Since it is on a different network, it cannot use the default Also, thank you for the |
Hi zobo,
Aha, yes ! There actually was some output: the
I created a directory somewhere else and ( It's still required to chmod the socket ( Can the socket be created with those rights ( Regarding the docker issue: I am also trying to use dbgpproxy and php-dbgpproxy but since my whole stack is running in isolated mode behind a reverse proxy I am running into other different issues. I can now focus on getting the socket working with my docker stack. Edit: and now it works with docker, under the same principle. Edit 2: I temporarily solved the permissions issue with a systemd unit that updates the socket permission automatically. |
Similar problem here: Php Debug v1.34.0 Launch.json {
"name": "XDebug",
"type": "php",
"request": "launch",
"hostname": "unix:///tmp/xdebug.sock"
}, Debug console:
|
Interesting. Let me check on this. |
@plokko This is very strange. It looks like the |
I went back and retried your config on my Linux VM and it works. Try to run the command "Developer: Show Running Extensions" from the command palette and try to find extensions that might conflict and disable them to see if this is the case. |
i should have none conflicting and it's easy to check as i do list all extension on devcontainer config file: "extensions": [
"eamodio.gitlens",
"mhutchie.git-graph",
"onecentlin.laravel-extension-pack",
"vue.volar",
"sdras.vue-vscode-snippets",
"devsense.phptools-vscode",
"ormulahendry.auto-rename-tag",
"redhat.vscode-yaml",
"xdebug.php-debug",
"tabnine.tabnine-vscode",
"christian-kohler.path-intellisense"
], |
Actually Here is a relevant issue filed with Devsense: DEVSENSE/phptools-docs#355 |
You were right,if i disable it works! |
Hello,
I can't get unix socket to work.
PHP version: 7.4.28
Xdebug version: 3.0.2
VS Code extension version: 1.26.1
Your launch.json:
Xdebug php.ini config:
Xdebug logfile (from setting
xdebug.log
in php.ini):VS Code extension logfile (from setting
"log": true
in launch.json):Code snippet to reproduce:
I run vs code with the configuration above on a vanilla apache2/php/debian11.
Steps to reproduce
sudo rm /tmp/xdebug.sock
)/var/www/html
on Debian 11,launch.json
is in/var/www/html/.vscode
a. I chown the socket created by the extension at step 2 so it can be read/write by the webserver
chown 33:33 /tmp/xdebug.sock
.b. I leave the socket as it is created by the extension
Vs-code should then pick up and start the debugging process but nothing happens and
xdebug.log
is empty and not created. It's like xdebug didn't start server-side but everything works as expected if I swap the configuration with:Am I forgetting something in the configuration (xdebug.ini or launch.json) or am I misunderstanding how the socket is supposed to work ?
Why do I chown the socket ?
Actually my goal is to run the debugger from the host machine with PHP behind a reverse proxy both in their own container on the same docker network isolated from the host but so far it's not working either (but at least xdebug output some log) so I am trying to get the socket right first before trying further with the docker stack.
The text was updated successfully, but these errors were encountered: