Debugging undo stack issues

That is a little how I did it.

  1. Figure out what set of circumstances make the issue happen. (reproduction steps)
  2. Figure out what all code is being called in the circumstances. (including Observers and such)
  3. Use process of elimination to figure out which chunk of code causes the problem.
  4. Fix the problem and release the new version.
  5. Deal with support issues from people with the old version still installed.

This was a particularly bad one because an undo observer indirectly triggered some code that inadvertently added transactions to the undo stack, essentially making it impossible to undo! :frowning:

1 Like