You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using PHP CLIs inside the dev container they produce multiple warnings like:
Xdebug: [Step Debug] Could not connect to debugging client. Tried: localhost:9000 (through xdebug.client_host/xdebug.client_port).
The CLIs work as intended, but the warnings make the CLI experience uncomfortable, especially when repeated 20 times after the normal output of a utility.
As I understand the image enables Xdebug functionality so user's own PHP code can be debugged with F5. I know I won't be doing that, what is the best way to disable it in a dev container?
I tried to add
"remoteEnv": {
"XDEBUG_CONFIG": "mode=off"
},
to devcontainer.json but it has no effect.
The text was updated successfully, but these errors were encountered:
I am not familiar with the PHP dev stack. Have you explored if the behavior can be controlled through the extension settings for PHP Debug extension that comes with the image? extension info here
I'm not familiar either, I'm running it in a dev container as I'm learning PHP :-)
As far as I understand the problem is that when xdebug is enabled (which it is in the image with the /usr/local/etc/php/conf.d/xdebug.ini config file) anything executed with php tries to connect to the debugger UI. When I'm using PHP-based CLIs in command line there is no debugger listening on port 9000, and it isn't my intention to debug these tools. I was hoping I would be able to disable the xdebug with environment variable XDEBUG_CONFIG as described here but it doesn't seem to help. Perhaps I'm doing something wrong.
I'll have a look at the VSCode extension documentation for some hints, but with only a small hope: the warning is printed exactly because I'm not using the extension when calling PHP.
When using PHP CLIs inside the dev container they produce multiple warnings like:
The CLIs work as intended, but the warnings make the CLI experience uncomfortable, especially when repeated 20 times after the normal output of a utility.
As I understand the image enables Xdebug functionality so user's own PHP code can be debugged with F5. I know I won't be doing that, what is the best way to disable it in a dev container?
I tried to add
to devcontainer.json but it has no effect.
The text was updated successfully, but these errors were encountered: