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

Why can rails not find a route created by a helper? -

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -