I am trying to view the entire contents of a variable in the IDLE Debugger for Python 3.6.1. The debugger gives a preview but there appears to be no way to pull all the data out from the debugger.
The only work-around I've found is to throw a print()
statement in the code somewhere. Is this the only way? See picture:
This example's decryptedText
variable has over 700 characters but as we see, only a few are visible. Thanks.
As the IDLE debugger is currently written, the only way to get more information about the state of an object at a particular point in the execution is to either insert print
calls in the code or stop execution (raise SystemExit
, for instance) and interact with the object in the Shell.
What you see in the locals/globals panels are representations of objects produced by reprlib.Repr
with maxstring
and maxother
increased to 60
. One could edit NamespaceViewer
in idlelib/debugger.py
(3.6 name) to increase maxstring
to, say, 200 and maximize the debug window. (I verified that this works to show more of a string.) One could also try replacing the single line Entry widget with a Label widget sized to height
lines and width
chars and setting maxstring
to height * width
. (Untried.)
I agree that being able to get more information on a object would be good. I am currently thinking about a separate popup window with type, length (if appropriate), and a much bigger slice of the contents.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With