Subj : Re: Rollback Functions To : comp.programming From : Dave Date : Wed Oct 12 2005 11:52 am Duane Arnold wrote: > yaoziyuan@gmail.com wrote in news:1129094876.514280.40560 > @g44g2000cwa.googlegroups.com: > > >>I'm not talking about database operations; I'm talking about general >>debugging, e.g. debugging a C program. >> >>I'm talking about a "Step Back" command in addition to the "Step Into", >>"Step Over", "Step Out" commands commonly seen in an IDE's (such as >>Microsoft Visual Studio's) Debug menu. >> > > > You must be joking right? It will never happen. The Debug in an IDE is > supposed to keep track of everything the program has done and undo it? I > don't think so. The thing has enough to do just keeping book marks > straight to get back to code. > > Duane :) > > > There's no reason it can't be partially implemented. i++ is trivial to roll back. A call to a system function isn't. But just because the latter (probably) can't be done, doesn't mean that it shouldn't be done at all where it can be. Keeping track of everything it's done since starting is of course unlikely; a rollback buffer of perhaps a couple of MB would be one way to provide rollback to a few steps, which will probably do in the majority of cases. Sometimes it would just be useful to step back a few lines - you don't need the entire history of the planet to achieve that. .