title: Python: How to save current variables while debugging?
body: <p>I have a general debugging question in python (pycharm IDE if it matters)</p>
  
  <p>Lets say I have code which is made up of 2 blocks:</p>
  
  <pre><code>Code block 1 (takes very long to run)
  Code block 2 (where I want to debug)
  </code></pre>
  
  <p>Is there a way to save the current variables at the end of running code block 1, so that I can "rewind" back to those variables states and debug from there, without having the re-run the entire script to recompute those variables?</p>