clean-architecture
clean-architecture copied to clipboard
Debugging in docker containers
Story: As a reader of Implementing the Clean Architecture I would like to understand the code by stepping through parts of it it.
Problem: I was unable to set up a VSCode’s debugger to work with the docker containers (Another debugger is also fine – pudb, ipdb probably come without many dependencies)
Hi, let me check it out. I am not working with VS Code, but I'll do my best to see if I can make it work
I am not working with VS Code
In case VS Code does not work well for you, another open source app should do it, too. I just think that PyCharm would work as docker support is only active in the pro version.
I have a project running with VSCode and Devcontainer where I debug using debugpy
.
I run the program through:
- "python"
- "-m"
- "debugpy"
- "--listen"
- "0.0.0.0:8001"
- "boy.py"
Then having VSCode listening to the debuger on 8001
Guess you can do smtg similar on local. ;)
@titouanfreville Makes sense, I will try it. What I don't understand though – what/where is boy.py
?
what/where is
boy.py
?
Oups, sry. Thatcher from my on code.
Here it you should replace boy.py with
auctioning_platform/web_app/web_app/app.py` but it would require a Little change in the file as it is made to run through flask command instead of main