-
Notifications
You must be signed in to change notification settings - Fork 275
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
Debugging Error Xdebug: [Step Debug] Could not connect to debugging client #11
Comments
Same issue with the default preconfig image of PHP
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.194.3/containers/php
{
"name": "PHP",
"build": {
"dockerfile": "Dockerfile",
},
"settings": {
"php.validate.executablePath": "/usr/local/bin/php"
},
"extensions": [
"felixfbecker.php-debug",
"bmewburn.vscode-intelephense-client",
"mrmlnc.vscode-apache"
],
"forwardPorts": [8080],
"remoteUser": "vscode"
}
ARG VARIANT="7.4"
FROM mcr.microsoft.com/vscode/devcontainers/php:0-${VARIANT} |
This is normal when not debugging the application. By default xdebug listens for a "debugging" connection. If you are not debugging, then it displays the warning that you are seeing. When you try running your application with F5 (debugging mode) then you will not see that message. |
@mabasic , I try to F5 to debug. I can see the server is running in remote container I also try in terminal with |
When you start debugging in vs code, you should open the browser to the port on which your application is running, not the port of the debugger. Set a breakpoint in vscode, make a request to your application so that the breakpoint is triggered and you will see that the application execution is paused and that you can see the current variables in vsvode. |
@mabasic , I try your suggestion. when you run F5 and enter the debugging mode, you can see your runing process is on the port 9003. I try to browse both port 8080 and 9003, but I cannot reach both of them. |
See the readme for debugging instructions. I think that you need to start the server first. |
@mabasic , Thanks. I manage to solve the issue. It turns out that I use the default launch.json from VScode and it doesn' work. I try to copy the launch.json of the repo and it works fine. |
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!
The text was updated successfully, but these errors were encountered: