Output PyCharm debugger information to file

Answered

Hi!

You have a great feature in PyCharm to output to file information from console (Run/Debug Configurations -> Logs -> Save console output to file).

Do you have the same (or similar) for Debugger window in PyCharm? I need to get debugger output information on each step.
If nothing is available, please give me a hint where to dig further.

Thank you in advance!

4 comments

Hi,

This feature also logs the output of the console in the debugger. It will not differ from the one which you get when you just run it though and won't log stepping through the code.

If you would like to have such feature, please feel free to submit a feature request to our issue tracker using the link https://youtrack.jetbrains.com/issues/PY and let us know if you need any help.

0

Hi, Sergey!

Thank you for your reply!

But I'm looking for a bit different PyCharm function. I need to get content of "Variables" window while debugging my code: current state of the code (available variables and objects states, etc.) on current step.

It can be current/latest state snapshot or full history of states from all previous debugging steps incl. current. Please see att. file below.

It would be perfect to save this content in external file (like txt or xml) for further custom (user-defined) automated/programmatic processing.
Is it possible to access this data on each step some other way (any existing API)?

If it's possible to get this data with existing PyCharm functionality (maybe some other specific way), please describe how to do it.
If it's impossible to get this data with existing PyCharm functionality, please let me know. I will submit a new feature request.

Thank you in advance!

 

0

Thanks for clarification.

I understood you correctly. There is indeed no such feature at the moment so it worth submitting a feature request.

There are some similar requests on SO, but suggested workarounds do not seem to meet your requirements (https://stackoverflow.com/questions/41434210/python-how-to-save-current-variables-while-debugging).

0

Ok. Then I will submit new feature request.

Thanks for your help!

0

Please sign in to leave a comment.