Wish List
In a perfect world, there there would never be any bugs to track down. However, just because we don't live in such a world, doesn't mean that we shouldn't try to minimize the pain. The following list is a collection of ideas that we think would make debugging easier.
- The ability to step backwards through code.
Think how much easier it would be to track down an incorrect value if you could step backward after the program crashed! At the price of much slower execution and a lot more memory, the debugger could save every change in state and apply these changes in reverse. (This is discussed at length in Debugging and the experience of immediacy. 1 The idea is not new. 2 Good programmers already work backwards when they debug. 3,4)
References
[1] Ungar, D., H. Lieberman, and C. Fry. Debugging and the experience of immediacy. Communications of the ACM, April 1997, Vol. 40, No. 4, pp. 38-43.
[2] Zelkowitz, M.V. Reversible Execution. Communications of the ACM, September 1973, Vol. 16, No. 9, p. 566.
[3] Weiser, Mark. Programmers Use Slices when Debugging. Communications of the ACM, July 1982, Vol. 25, No. 7, pp. 446-452.
[4] Burnell, Lisa and Eric Horvitz. Structure and Chance: Melding Logic and Probability for Software Debugging. Communications of the ACM, March 1995, Vol. 38, No. 3, pp. 31-41.