moodle-docker icon indicating copy to clipboard operation
moodle-docker copied to clipboard

XDebug client_port

Open meirzamoodle opened this issue 3 years ago • 3 comments

In order to use Xdebug, we need to disable the firewall or open the port used in the xdebug.client_port.

meirzamoodle avatar Oct 08 '22 12:10 meirzamoodle

Hi @meirzamoodle, did you add the client_port setting for documentation purposes e.g. firewall settings? 9003 is the default port.

TIA, Matteo

scara avatar Oct 09 '22 22:10 scara

Hi @scara,

Yes, the changes for example how to open the port.

meirzamoodle avatar Oct 09 '22 22:10 meirzamoodle

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.

image

meirzamoodle avatar Oct 10 '22 02:10 meirzamoodle

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!

meirzamoodle avatar Feb 08 '23 05:02 meirzamoodle

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.

NeillM avatar Jun 13 '23 12:06 NeillM

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).

stronk7 avatar Jun 15 '23 12:06 stronk7

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)

NeillM avatar Jun 15 '23 12:06 NeillM

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 :-)

stronk7 avatar Jun 15 '23 14:06 stronk7

Hi, @stronk7.

I already planned to complete this last week. Sorry for the late git push. Cheers.

meirzamoodle avatar Jul 02 '23 22:07 meirzamoodle

Thanks @meirzamoodle,

it looks perfect, I'll land this as soon as GHA tests end.

Ciao :-)

stronk7 avatar Jul 03 '23 10:07 stronk7