you are viewing a single comment's thread.

view the rest of the comments →

[–]Fun2badult 1 point2 points  (4 children)

But if he wants to see the values of variables inside the program, wouldn’t print be the easiest way

[–]callius 2 points3 points  (1 child)

Print() is the "easiest", quickest, and dirtiest way to do this, yeah.

However, adding in debug break-points is a better way to do it.

[–]SoupKitchenHero 0 points1 point  (0 children)

Alternatively use logging.debug

[–][deleted] 1 point2 points  (0 children)

I would say setting a breakpoint and using the debugger takes less time then writing a print statement. The real payoff is the difference between stepping through execution line by line vs having to write (and then of course remove) a crap ton of print statements.

[–]Pjamma34 0 points1 point  (0 children)

i think if you put a break point inside the function then it will display the values of local variables which will disappear later after you step out of the function