Python: How to save current variables while debugging?

后端 未结 2 913
说谎
说谎 2021-01-18 01:49

I have a general debugging question in python (pycharm IDE if it matters)

Lets say I have code which is made up of 2 blocks:

Code block 1 (takes very         


        
2条回答
  •  遥遥无期
    2021-01-18 02:53

    I am unaware of a general solution to this problem. But an application specific solution can be constructed using various methods for serializing objects, but I would suggest pickle for this problem.

    Like so much else, there is a small example already on SO.

提交回复
热议问题