-
-
Notifications
You must be signed in to change notification settings - Fork 179
Remote debug not working #677
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
Comments
What are you clicking to "start" Listen for Xdebug? |
I tried every method that you listed below. Screenshot? Appear the Debug bar and, after the execution of the open script, close itself. In Debug console I can see the result of the script. |
The only situation ever that the PHP script gets executed should be if the Can you add the |
Log is on true. Debug console say "PHP Fatal Error: Class 'Controller' not found", but this isn't true because I use Yii framework and not be loaded if it run just opened script and not listen for incoming connections. |
Not sure why it would start the script. Can you attach the log to your reply here? |
I switched to an older version of VSCode (from v1.60.0 to v1.57.1) and everything works fine now |
I tried also what you request and the issue came back so I think there is something wrong with VSCode version 1.60.0 |
Thanks for trying this out. So if I understand correctly the combination:
I am currently running vscode 1.61.2 |
Exactly @zobo, tried this combinations:
|
I'm seeing the exact same issue. I'm running code-server: I've tried xdebug versions 1.19.0 - 1.21.0 Downgrading code-server is the only way I've found to get it work again. Let me know if you need anymore info. |
What about 1.61.0? |
Latest code-server version (3.12.0) has VSCode 1.60.0 so it's not possible to try with newer version |
I think it might have been reported here too: coder/code-server#4362 |
Interesting, I never tried code-server. Hopefully I'll manage to test it... |
I just tried using open code server (https://github.com/gitpod-io/openvscode-server) there are various version available. The latest ships with VSCode 1.62.0 and this works correctly with php debug 1.19.0. I tried with an earlier version VSCode 1.60.0 and it fails in the same way as above. However, VSCode 1.60.2 works fine. So perhaps it's something specific to VSCode 1.60.0? |
When select "Listen for XDebug", it not wait for incoming connection but run the debugger, execute the opened PHP script and stop. Any suggestions? (Excuse me for my - bad - english!)
PHP version: 8.0.1
Xdebug version: 3.0.2
VS Code extension version: 1.21.0
Your launch.json: {
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 10000,
"log": true,
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 0,
"runtimeArgs": [
"-dxdebug.start_with_request=yes"
],
"env": {
"XDEBUG_MODE": "debug,develop",
"XDEBUG_CONFIG": "client_port=${port}"
}
},
{
"name": "Launch Built-in web server",
"type": "php",
"request": "launch",
"runtimeArgs": [
"-dxdebug.mode=debug",
"-dxdebug.start_with_request=yes",
"-S",
"localhost:0"
],
"program": "",
"cwd": "${workspaceRoot}",
"port": 9003,
"serverReadyAction": {
"pattern": "Development Server \(http://localhost:([0-9]+)\) started",
"uriFormat": "http://localhost:%s",
"action": "openExternally"
}
}
]
}
Xdebug php.ini config:
xdebug.remote_autostart = 1
xdebug.remote_enable = 1
xdebug.client_port = 10000
xdebug.mode = debug
xdebug.discover_client_host = 1
xdebug.start_with_request = yes
xdebug.remote_connect_back = 1
The text was updated successfully, but these errors were encountered: