Make set_trace() in same program remember previous state

#33 Merged at f043ad8
Repository
Branch
set_trace_remembers_previous_state
Repository
Branch
default
Author
  1. Marc Abramowitz
Reviewers
Description

Make set_trace() in same program remember previous state

So if you have a program like:

a = 5
import pdb; pdb.set_trace()
a = 4
import pdb; pdb.set_trace()
a = 3
import pdb; pdb.set_trace()
a = 2
import pdb; pdb.set_trace()
a = 1

and at one of the breakpoints, you do display a or sticky, it will preserve those settings when you do cont and then hit another breakpoint.

This is an alternative to pull request #2.

I added a test called test_set_trace_remembers_previous_state.

$ tox -e py26,py27,py32,py33,py34,pypy,pypy3
...
  py26: commands succeeded
  py27: commands succeeded
  py32: commands succeeded
  py33: commands succeeded
  py34: commands succeeded
  pypy: commands succeeded
  pypy3: commands succeeded
  congratulations :)

Comments (2)