Is it possible to "watch" a variable with PyCharm? I want to see the values a variable takes on as it runs through a loop.
Or is there something like console.log()
? I am aware of breakpoints (I don't want to break), print
and pprint
:). It would be awesome to click open a list or object for example.
Use the "Watches" pane, this shows how to find it: Pycharm - How do I access the "Watches" pane?
You can just drag variables from the "Variables" pane into it.
You can also watch expressions, e.g. var + 1
.
Breaking when a variable changes however is currently not possible: Stop at the line where a variable gets changed
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