Open stefnats opened 3 years ago
In terminal when i type in:
# lsof -i :9000 | grep LISTEN
I don't get a result.
Do you have a repository with this problem?
The steps in vscode-remote-try-php includes running php -S 0.0.0.0:8000
which appears to work.
I’m experiencing this as well. After some digging, it appears to be related to this line where xdebug.start_with_request
is set to yes
.
Based on this stackoverflow answer written by the author of xdebug, I think xdebug.start_with_request
should be set to trigger
. This would suppress the Could not connect
warning and still allow users to start an xdebug session using a browser extension or by setting an environment variable.
If this sounds like a good solution, I would be more than happy to create a PR.
Unfortunatley it does not look like the VS Code extension works with the property set to "trigger". Certainly am open to it if it works there.
I call php -dxdebug.mode=off
if I need it off but since this is the container for development, I just leave the XDebug running whenever I'm running PHP code.
原 xdebug.client_port=9900 换成 xdebug.client_port=9003
就可以了
This is not a VSCode issue, it happens with PhpStorm as well. See my answer here: https://stackoverflow.com/a/76643876/3823826
Hello,
i'm using this container with the following config (
devcontainer.json
):When i run any php process i receive this error
Dockerfile
is still as is: https://github.com/microsoft/vscode-remote-try-php/blob/67e233b925a64f90a46092879ed82b9e6d89f19e/.devcontainer/DockerfileAm i doing something wrong? Thanks in advance!
Steps to Reproduce:
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port) :-(
Edit: It happens too with this Version: https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/php/.devcontainer