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
Add ddev xdebug toggle flag #3593
Comments
Sounds fine. A PR against https://github.com/drud/ddev/blob/a57e03500f1ba96ac1bd456f922c236d6c20d06d/pkg/ddevapp/global_dotddev_assets/commands/web/xdebug would be easy to do and it's easy for you to test because you can just override the default command. |
Hi @rfay Sorry for late reply.
So I'm missing the instruction how to successfully build it and replace the ddev executable I currently use system wise to try it out when I make the changes in xdebug bash file. |
Somebody else hit that, not sure what's up with it, but
and see if that gets you farther. You also may want to use gitpod, which is all set up with everything you need. Thanks for working on it! You don't actually have to build ddev to test it, you can just work on the ~/.ddev/commands/web/xdebug (with #ddev-generated commented out) and then provide the result. However, since there's special test coverage for |
Thanks for the tips @rfay I updated go to 1.17.6 and ran go mod vendor and tidy but I still get the same error.
|
It looks like you have an ancient version of ddev source. Could you please update to the current version? I think that will help. |
It's no surprise that you don't have xdebug in your ~/.ddev/commands/web I guess. It got moved there in the alphas. In your (v1.18.2? ) version it's in the project .ddev/commands/web directory. But it hasn't changed any way I can remember, so you can experiment with it there. |
I do have the latest master in my /tmp/ddev folder as I cloned in from github after creating this task. Locally, in projects, I use the latest release 1.18.2 and I see the xdebug file in the project (not home folder). Anyway I will try to work in the project's xdebug file later today. |
Ah, sorry. I saw the /tmp/ddev path and thought it was a complaint from inside the container that we used to use for builds. No idea what's going on with the build. If you just want to use gitpod, it's all set up there. But the path you're on is great. |
Yes indeed it would be great DX improvement. |
@louis-cuny could you please review |
@rfay |
I'm going to close this for now; it's easy to test your update to the xdebug command by just editing it in ~/.ddev/commands/web and removing the #ddev-generated and getting it to do what you want, then you can submit it as a PR. Looking forward to the PR. |
I've raised #5625 to add a toggle arg for the xdebug command. |
Co-authored-by: Stanislav Zhuk <stasadev@gmail.com>
Currently ddev xdebug commands allows the following flags:
ddev xdebug on|off|enable|disable|true|false|status
It can either enable, disable or return the status of the xdebug.
In practice when we need to use xdebug we turn it on and then turn it off when we don't need it any more.
Those are two separate commands when we run them in our terminal window.
A good DX would be to have a
ddev xdebug toggle
flag so it basically reads the current status of xdebug and inverts it.
We would then be able to use the same command like we are used with drush cr for example.
"ddev xdebug toggle" will also return the current new status after being executed.
The text was updated successfully, but these errors were encountered: