title: Does Post-Mortem Debugging in Python allow for Stepping or Continuing?
body: <p>I have been playing around with post-mortem debugging and am having some problems.  Consider the following python script called <code>example.py</code>:</p>
  
  <pre><code>k = 0
  print 1. / k
  print 'continue ...'
  </code></pre>
  
  <p>I can run this with:</p>
  
  <pre><code>&gt; python -m pdb example.py
  </code></pre>
  
  <p>and then step to line 2 <code>print 1. / k</code> and then set <code>k = 1</code> and then continue with the pdb command <code>c</code>.</p>
  
  <p>Now if I do this with post-mortem debugging I am unable to continue program execution.  I run with:</p>
  
  <pre><code>&gt; python -i example.py
  </code></pre>
  
  <p>and then after I am dropped into the shell I do a:</p>
  
  <pre><code>import pdb
  pdb.pm()
  </code></pre>
  
  <p>I am then able to change the value of <code>k</code> as before, but I am unable to continue with any program execution. Pdb just simply exits.</p>
  
  <p>I was unable to find anywhere that it explicitly states that you cannot step through a program in post-mortem.  It appears to be the case.  So then I would like to understand the value of post-mortem debugging.  Is the only value to examine the state of the code when the error occurred?</p>