Skip to content
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

Issue #33: Add ability to call xDebug via warden for CLI scripts #35

Merged
merged 6 commits into from
Jan 25, 2020

Conversation

molotovbliss
Copy link

Feature request enhancement #33

@davidalger
Copy link
Collaborator

@molotovbliss Thanks for this! I will try and take a good look at it some time next week. This highlights the need I think (referencing the gist you linked on #33) for adding the ability to setup custom commands on an installation of Warden as well.

@molotovbliss
Copy link
Author

@molotovbliss Thanks for this! I will try and take a good look at it some time next week. This highlights the need I think (referencing the gist you linked on #33) for adding the ability to setup custom commands on an installation of Warden as well.

Np, wasn't sure if there was a better way to call docker exec via warden as it seems most go towards docker-compose. BTW, warden makes Magento dev a breeze. Thanks for the great tool.

@mike-keilty
Copy link

@molotovbliss I tested these changes out locally and they work great! Thank you for this.

@molotovbliss
Copy link
Author

@mike-keilty If it helps just one person that's awesome in my book. BTW I believe the next warden release has a much more elegant approach than this. (See the referenced issue associated with this pr). Cheers! 🍺

@davidalger davidalger changed the base branch from master to develop January 25, 2020 19:43
davidalger added a commit to davidalger/docker-images-warden that referenced this pull request Jan 25, 2020
davidalger added a commit to davidalger/docker-images-warden that referenced this pull request Jan 25, 2020
@davidalger
Copy link
Collaborator

This PR has been rebased on latest develop and updated to conform to the following (slightly different) take on the original proposed solution:

  1. Introduces a new command warden debug; when this is run the user is launched into a shell similarly to when warden shell is run, but in this case the shell is opened by default within the php-debug container.

  2. When user is launched into a debug container, the env variable XDEBUG_REMOTE_HOST is passed in and conditionally set to either host.docker.internal on macOS and to the gateway IP of the warden network on Linux systems.

  3. The base images have been updated to add the following to /etc/php-cli.ini bringing it all together without any potential for disrupting already present and reliable in-browser debugging:

[php]
xdebug.remote_autostart=on
xdebug.remote_host=${XDEBUG_REMOTE_HOST}

Big shout out to @wcrb15 for helping ascertain what the remote host should be configured to on Linux systems and to @molotovbliss for getting the ball rolling with the idea of a special debug command.

@davidalger davidalger added this to the Warden 0.2.0 milestone Jan 25, 2020
@davidalger davidalger merged commit c010824 into wardenenv:develop Jan 25, 2020
davidalger added a commit that referenced this pull request Jan 25, 2020
davidalger added a commit that referenced this pull request Jan 25, 2020
ihor-sviziev pushed a commit to ihor-sviziev/warden that referenced this pull request Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants