-
Notifications
You must be signed in to change notification settings - Fork 8
Debug Django Code With Docker Compose
Ismael edited this page Jan 9, 2017
·
1 revision
In another terminal use command:
$ docker ps
And get the id of the Django container
$ docker attach 9339824e2154
Now that terminal is attached to the docker container running django. If you perfor a request you will see the request log in that terminal.
Using this line:
import ipdb;ipdb.set_trace()
And it will stop in the breakpoint:
Navigate through the code is pretty easy.
h: help
n: next
s: step-in
u: step-up
c: continue
l: list context