akretion / docky-odoo-template

This a project template to use with docky
2 stars 13 forks source link

[ADD] enable web debugger in docker #87

Closed metaminux closed 1 year ago

metaminux commented 1 year ago

@Kev-Roche here is the addition for a web debugger.

I made it "pluggable" for the main part, there is just the addition to the dev image in Dockerfile that is not.

Documentation for WDB usage is here : https://github.com/Kozea/wdb#readme

Feel free to comment.

Kev-Roche commented 1 year ago

Thank you @metaminux , from my point of view, it s a nice and improved alternative of the classic pdb.

kevinkhao commented 1 year ago

thank you @metaminux seems interesting, as far as usage do you typically just put a import wdb; wdb.set_trace() ? also

wdb works with python 2 (2.6, 2.7), python 3 (3.2, 3.3, 3.4, 3.5) and pypy

no issues ?

metaminux commented 1 year ago

@kevinkhao Yes I typically add

import wdb
wdb.set_trace()

and I never had issues about the python version

bealdav commented 1 year ago

Nice addition, thanks.

Maybe we could ask for add it like here https://github.com/akretion/docky-odoo-template/blob/main/copier.yml#L28-L29 ?

metaminux commented 1 year ago

Nice addition, thanks.

Maybe we could ask for add it like here https://github.com/akretion/docky-odoo-template/blob/main/copier.yml#L28-L29 ?

Hi @bealdav

I suppose using copier answer would provide a better way to add it or not in the Dockerfile, is this what you have in mind ?

I just made it "pluggable" using the same logic that was already used for adminer, so that we just have to put / remove it in .env file

metaminux commented 1 year ago

@bealdav We're now asking for the addition of web debugger or not.

bealdav commented 1 year ago

Thanks a lot I suggest to ask for a review to @hparfr I suppose he has an opinion on the way to do it. If everybody is OK, we may also manage adminer with the same way.

hparfr commented 1 year ago

@Kev-Roche @kevinkhao @bealdav have you tested this PR ? Then you can update your reviews.

PS: The author of wdb says it's not maintained anymore and he has started a refactoring.

bealdav commented 1 year ago

I haven't tested, but I'm not sure this is really necessary for now.

We just need to ensure to this PR make a sort of plugin system, no ?

bealdav commented 1 year ago

When this PR 'll be merged I might switch adminer config in the way except if somebody think it's a bad idea.

metaminux commented 1 year ago

@Kev-Roche ? @kevinkhao ? @bealdav ? Anyone ? To get a review on that PR to unlock merging...

Kev-Roche commented 1 year ago

@hparfr , @bealdav , @kevinkhao LGTM If no objection at the end of the week, I'll merge it.

hparfr commented 1 year ago

So, @Kev-Roche did you test it ?