Printing Variable names and contents as debugging tool; looking for emacs/Python shortcut
Posted
by Schof
on Stack Overflow
See other posts from Stack Overflow
or by Schof
Published on 2010-05-11T18:04:40Z
Indexed on
2010/05/11
18:54 UTC
Read the original article
Hit count: 161
I find myself adding debugging "print" statements quite often -- stuff like this:
print("a_variable_name: %s" % a_variable_name)
How do you all do that? Am I being neurotic in trying to find a way to optimize this? I may be working on a function and put in a half-dozen or so of those lines, figure out why it's not working, and then cut them out again.
Have you developed an efficient way of doing that?
I'm coding Python in Emacs.
© Stack Overflow or respective owner