-
Notifications
You must be signed in to change notification settings - Fork 4
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
XDebug not working out of the box in VSCode #184
Comments
@roborourke Ugh, I thought I cracked it after reading about every VSCode + Docker post on the internet (this one was the winner, upon close reading) — I had this working ever so briefly, after setting
(and changing the name of the Altis .ini file so that it loads last and doesn't get overwritten 😬) But, in typical fashion I then did something that I didn't properly track, and now I can't recreate my success. |
Aha! I've now consistently gotten it to connect by toggling these two settings:
|
Nice work @kadamwhite - glad it wasn't the host name, that would've been a pain to solve. I'll PR the ini file changes. I'm not sure |
Digging a little deeper there were a few more things at play here:
This tells me the problem is our default |
I did wonder that about default_enable, but the value of better stack traces in the logs and errors is pretty big so since the whole thing's opt-in I'd suggest keeping it. |
Fixes #184 This changes from manually setting the XDEBUG_SESSION cookie and relying remote enabling in favour of setting the XDEBUG_CONFIG environment variable. This will ensure that the debugger connects every time and will handle setting the cookie itself. This also means XDebug can be used to debug CLI commands. Given that local server has 2 separate modes, with & without xdebug having it always be on in xdebug mode is worth the performance hit as developers can easily switch back.
I've found that there's a better way to default enable it using the I found that technically you're supposed to be able to use the static IP It's really annoying that there isn't a global solution but I've made a PR that I'd appreciate a quick test of when you get a sec. |
Fixes #184 This changes from manually setting the XDEBUG_SESSION cookie and relying remote enabling in favour of setting the XDEBUG_CONFIG environment variable. This will ensure that the debugger connects every time and will handle setting the cookie itself. This also means XDebug can be used to debug CLI commands. Given that local server has 2 separate modes, with & without xdebug having it always be on in xdebug mode is worth the performance hit as developers can easily switch back.
Fixes #184 This changes from manually setting the XDEBUG_SESSION cookie and relying remote enabling in favour of setting the XDEBUG_CONFIG environment variable. This will ensure that the debugger connects every time and will handle setting the cookie itself. This also means XDebug can be used to debug CLI commands. Given that local server has 2 separate modes, with & without xdebug having it always be on in xdebug mode is worth the performance hit as developers can easily switch back.
Released in 4.0.1 and 3.0.6 |
Describe the bug
I would expect that after running
composer server start --xdebug
, I would be able to connect from VS Code. Following the instructions in this repository I am able to start the xdebug listener within VS Code, but trying to enable XDebug using a browser extension in either Firefox or Chrome fails to start (the icon does not turn Green, extension does not indicate it is listening) and no connection appears to be made between the browser, docker container, and editor.I am wondering if this might be related to the
autostart
option; these are the php.ini settings after using--xdebug
:To Reproduce
Steps to reproduce the behavior:
composer server start --xdebug
Expected behavior
A clear and concise description of what you expected to happen.
Actual behavior
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: