Open Cloudy777 opened 3 years ago
Yea let's keep this issue open... this has been requested a few times. I haven't looked into this because I've never had to do this, but if someone wants to chime in with instructions on how to set this up, that would be greatly appreciated.
In the end it is a simple configuration step:
After that set up a new Run Configuration:
Integration Tests can be debugged with this configuration as well.
@Cloudy777 thanks a ton for this, I created a new video lesson for it in the course https://courses.m.academy/courses/set-up-magento-2-development-environment-docker/lectures/36677538
@markshust - Thank you for the instructions, but how can we do the same thing in VSCode.
Good idea @malikabid -- I'll test and add a video for this.
Hi @markshust
Today I was able to do the debugging from command line including bin/magento and integration tests.
I just added the link in docker-compose.dev.yml
environment: XDEBUG_CONFIG: "idekey=VSCODE client_host=host.docker.internal client_port=9003"
and restarted the containers (bin/restart)
Appreciate it @malikabid, I re-opened this ticket so we could potentially add this info either to the README or to the docker-compose.dev.yml file itself.
Question
Is ist possible to run bin/magento s:up with xdebug on ?
I have tried the following: 1) run directly via terminal bin/xdebug enable bin/magento s:up (with breakpoint set) -> Doesn' stop at breakpoint
2) add php script in phpstorm
XDEBUG via browser works fine, everything is set up as documented.
Thank you for your input