Reputation: 343
While debugging in PyCharm, it's easy to check an object's fields while execution is suspended. Is there a way to similarly check the object's methods from the IDE, or is this a feature that has just not been implemented by JetBrains? The builtin hasattr
function checks for both, so one would think it would be an easy feature to implement in the IDE.
Upvotes: 5
Views: 2426
Reputation: 59303
I add dir(variablename)
to the watch window to achieve this. If it's not visible, activate it with Alt+5 (or View/Tool Windows/Debug
).
Another option is to use "Evaluate Expression" (Alt+F8) and do the same
Using Community Edition 4.0.4 on Windows 7 SP1 x64 if that should matter.
Upvotes: 7