clean-architecture icon indicating copy to clipboard operation
clean-architecture copied to clipboard

Debugging in docker containers

Open jdittrich opened this issue 2 years ago • 5 comments

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)

jdittrich avatar May 03 '22 21:05 jdittrich

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

Enforcer avatar May 04 '22 08:05 Enforcer

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.

jdittrich avatar May 10 '22 19:05 jdittrich

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 avatar May 24 '22 07:05 titouanfreville

@titouanfreville Makes sense, I will try it. What I don't understand though – what/where is boy.py?

jdittrich avatar May 24 '22 19:05 jdittrich

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

titouanfreville avatar May 24 '22 21:05 titouanfreville