1

I am trying to add a breakpoint() to a particular line in a Django code which is running on an ec2 instance. I have tried ipdb, pdb

tried import pdb;set_trace() it quits giving a BdbQuit error.

tried simply adding breakpoint

This simply gets ignored

None of them stop the code. If I run the code like this

python -m pdb manage.py runserver ,

it immediately drops into pdb and fails after executing 2 lines. How exactly should I use pdb in Django correctly?

Old answers don't work.

NKSM
  • 5,422
  • 4
  • 25
  • 38
Abhishek Rai
  • 2,159
  • 3
  • 18
  • 38
  • Does this answer your question? [BdbQuit raised when debugging Python with pdb](https://stackoverflow.com/questions/34914704/bdbquit-raised-when-debugging-python-with-pdb) – NKSM Jul 10 '21 at 20:13
  • @NKSM Provides an explanation for why it doesn't work. The program is running in the background..ok...but then what to do to debug? That part I cannot see. – Abhishek Rai Jul 10 '21 at 20:15
  • Another one https://stackoverflow.com/questions/13407554/how-can-i-debug-python-web-site-on-amazon-ec2 – NKSM Jul 10 '21 at 20:21
  • https://stackoverflow.com/a/48719897/6759844 – Brian Destura Jul 12 '21 at 06:53

0 Answers0