vim-vebugger
vim-vebugger copied to clipboard
Doest it work with Django?
Hi,
I've tested it with Django Web Framework (Python) but I can get it to work properly so far. By "work with Django" I mean to use the debugger for the python manage.py runserver command that starts a http webserver for development purpose, so the process keep listening for request. It seems to work on the server initialization, but do not stop on breakpoints for code executed on the requests/response cicle.
Did someone get it to work already in such case?
Thanks a lot!
I never tried using it with Django...
Hi, I have the same problem, if I do this manually (import pdb; pdb.set_trace()) it works. @idanarye is there any chance you will look into this? Or at least give me a hint where the problem may be? Thanks
This seems to be a limitation of Django and PDB themselves. I found a package that allows using PDB with django without manually adding pdb.set_trace(): https://github.com/HassenPy/django-pdb. I checked it with Vebugger and it works.
Note that you need to pass an argument either in the command line or in the HTTP request. It's all in the readme of that package.
Thanks for the reply. Could you elaborate more on the limitation please? django-pdb unfortunately is not enough for me.
Thanks
Never looked that much into it, since I'm not using Django myself, but I suspect that PDB does not support multithreading.
At least, not unless you call pdb.set_trace() manually in the thread you want to debug.