L
L
leha782016-05-07 09:15:32
Django
leha78, 2016-05-07 09:15:32

How do you debug code?

Came from PHP, where I used var_dump, die and it turned out to debug quickly.
Right now I'm parsing an xml file, and I ran into a problem with displaying parsed data, print is not an option at all. How do you debug django code? And where? If you run the shell through the line and there, then this is a hemorrhoid in my opinion, every time after the code is started, completely insert the code and run it again.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
landergate, 2016-05-07
@leha78

i used var_dump

Alternatives:
- pprint
- repr
- print vars(someObj)
-
from inspect import getmembers
from pprint import pprint
pprint(getmembers(someObj))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question