bugjar icon indicating copy to clipboard operation
bugjar copied to clipboard

Bugjar doesn't work with Django

Open beatthem opened this issue 11 years ago • 3 comments

First, I must say thank you for creating so simple but powerful debugger for python.

Second. I have troubles with using Bugjar on Django (1.4.10) and Python 2.6.

  1. There is "skip" parameter for Bdb in Python 2.7, but not 2.6 - so python 2.6 raises exception.
  2. If I omit this parameter, django doesn't work well with Bugjar - If I let django run in debugger, but set breakpoint before, first few seconds (~20) Django application doesn't respond (It may be django startup time, don't know, but after I click few times Run - application starts to respond, BUT it doesn't stop at breakpoints. Maybe it new Django threading server? Even with --noreload option (bugjar manage.py runserver 8000 --noreload) it doesn't stop at breakpoints.

beatthem avatar Jan 19 '14 17:01 beatthem

Thanks for the report @beatthem. There's two issues here -- Python 2.6 compatibility and Django compatibility. I'll retask this ticket to track the Django issue; I've opened a second issue (#9) to track the Python 2.6 issue.

As for the Django issue - There's definitely work to be done here. You need to be using "runserver --noreload --nothreading" to get Django support working at all; but even then, it's quite slow because of the verbosity of the line protocol.

This is something that I want to work on when I get a chance, but it's not a small job. I'll leave this ticket open as a marker for the problem.

freakboy3742 avatar Jan 20 '14 00:01 freakboy3742

I've tried "bugjar manage.py runserver --noreload --nothreading" but it seems to ignore noreload/nothreading options, because I see 3 workers for bugjar itself and 3 workers for bugjar-net in htop (Ubuntu 13.04)

With simple "python manage.py runserver --noreload --nothreading" there is only 1 worker, as expected.

I've also noticed that 6 processes of bugjar appears before manage.py start to process command line options --noreload and --nothreading.

beatthem avatar Jan 20 '14 06:01 beatthem

I was able to start django server with noreloading and nothreading options; just more patience was needed.

bugjar-net creates 2 processes, I think for communication by sockets.

beatthem avatar Jan 20 '14 15:01 beatthem