Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doest it work with Django? #56

Open
sidneijp opened this issue Apr 17, 2018 · 6 comments
Open

Doest it work with Django? #56

sidneijp opened this issue Apr 17, 2018 · 6 comments

Comments

@sidneijp
Copy link

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!

@idanarye
Copy link
Owner

I never tried using it with Django...

@drozdowsky
Copy link

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

@idanarye
Copy link
Owner

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.

@drozdowsky
Copy link

Thanks for the reply. Could you elaborate more on the limitation please? django-pdb unfortunately is not enough for me.

Thanks

@idanarye
Copy link
Owner

Never looked that much into it, since I'm not using Django myself, but I suspect that PDB does not support multithreading.

@idanarye
Copy link
Owner

At least, not unless you call pdb.set_trace() manually in the thread you want to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants