Closed meirzamoodle closed 1 year ago
Hi @meirzamoodle,
did you add the client_port
setting for documentation purposes e.g. firewall settings?
9003
is the default port.
TIA, Matteo
Hi @scara,
Yes, the changes for example how to open the port.
Actually, there are other things to do if we're working with VSCode, Need to add a configuration in launch.json (configuration file from PHP debug extension), but I'm not sure if should i add it in the README file.
Hi @meirzamoodle,
I must confess that I'm not 100% sure if this sort of information corresponds here, this can become a thick book if every single detail is added, not to talk about individual IDEs/environment differences.
In any case, ok, let's give to this a pass. If things become out of control, we always can apply scissors in the future.
Please take a look to the suggestions and this will be ready to be merged. Thanks for your collaboration!
Hi @stronk7.
I just updated the changes based on your suggestion. Cheers!
I have manged to get remote debugging working on PHPStorm with only a single change to the documented steps in the current README, that was to add an IDE key to the configuration, i.e.:
xdebug.idekey = moodle
However that might not be technically needed, but is probably useful in my case where I can have several different docker servers running with xdebug enabled.
My current setup has everything running on WSL2 containers.
I remember the idekey
detail was discussed somewhere (relatively recently). Found it @ https://github.com/moodlehq/moodle-docker/pull/163 ... maybe we can go and add a side comment here about it (for whichever integrations needs it).
The idekey may well not be needed (I didn't try without it) at least in PHPStorm it looks as though it should not be required
I suspect you might want one in cases where you are running for example multiple moodle-docker instances for different versions of Moodle or different patches so that only debugging calls for the code you are looking at get to the correct IDE (in this sort of case you would probably want different keys for each docker instance)
Or if you have completely different different applications running on various docker instances (for example I have a Moodle and our online exams system)
I'm happy if we add it (commented) with something saying that, depending on the IDE or environments, it may be needed to setup it.
Would you, @meirzamoodle ? I think that with that little addendum... this can finally land... ciao :-)
Hi, @stronk7.
I already planned to complete this last week. Sorry for the late git push. Cheers.
Thanks @meirzamoodle,
it looks perfect, I'll land this as soon as GHA tests end.
Ciao :-)
In order to use Xdebug, we need to disable the firewall or open the port used in the xdebug.client_port.