python - How do I use log.debug in a .py file in django? -


i have

log.debug("variable %s" % variable)  

in .py file in django.

when went run in debugger in textwrangler clicking on #! --> run in terminal, couldn't log.debug output show up.

i'm familiar javascript, can type console.log() , see output when open console.

what's equivalent of web console python?

the correct way debug django/python app place breakpoint in code

import pdb; pdb.set_trace() 

if want print variable in console, use print function.

you can raise exception or return httpresponse containing variable.

although, encourage use breakpoint approach.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -