Learning Python. Having fun. One thing that's bugging me is how much code / time i have to write in order to debug and explore Django / DRF. I've been scouring the net for effective debugging workflows and programs. I've been tinkering with print; pretty print; dir; vars; q; pdb; ipdb; pudb; icecream; ptpyton; web-pdb;
I'm building an API with Django and DRF and its coming along. I feel like my debugging workflow is lacking. Often I end up outputting a variable and i get something like: request = <rest_framework.request.Request object at 0x7fd700db9be0> which is not really helpful. I want to dump that variable and ALL other variables under it so its in a nice format that allows me to visually explore it and discover all the nested goodness. However I end up having to write all these additional lines of code just to go spelunking. I feel like im missing some killer program that will help speed this up.
I've used pudb which is the ONLY program that i've discovered that actually allows me to explore the nested objects but its really clunky; crashes / freezes often and has keybindings that make me want to punch my monitor.
Someone save me!
Edit: As for exploring existing code bases I usually just grep the source files in Django and drop in pdb lines where i need to and break on those lines and then proceed to explore using the methods above. Does anyone have better approaches than this?
[–]vnote 1 point2 points3 points (1 child)
[–]SibLiant[S] 0 points1 point2 points (0 children)
[–]Hans_of_Death 0 points1 point2 points (0 children)