I would like to use pdb to debug a view in Django but so far i've been unsuccessful, getting a BdbQuit error:
The view i've tried this on is a simple get request:
def get_file_names(request):
pdb.set_trace()
my_files = Files.objects.filter(user_id=request.user))
name_list += list(map(lambda x: (x.id, x.name, x.description),
my_files))
return JsonResponse({'rows': name_list})
A couple notes:
I prefer not to use Django pdb since this forces me to modify the client's request parameters.
I also do not want to call my code from pdb (since this code is being called from the client).
- Django Version 1.10.6
- The app is running inside a docker container
Does anyone have a solution which works? Im finding that debugging complex web requests in python can be very tedious and it would be really amazing if pdb worked.
Note this is not a subprocess, just a simple get request (eventually i would like it to work on a more complex request but i've posted a simple example since this already fails).
Any suggestions? Suggestions here dont seem to work.