It would go completely against all the rules of debugging to go backwards,
interesting idea, very complicated because what are you stepping backward,
code, variables, tables, user actions, sounds to me like you need monitor
more information as you are debugging so that you understand what is
happening on each step.
Many thanks, guys. I just wanted see to again what the code just did so this
will do it. I don't care about the data because I'm programming against a
development DB, never the production DB.
You guys are great.
It depends on the operation being repeated and what has transpired between
the first time the line was executed, for example...
strSQL = "UPDATE sometable SET SomeField='Whatever'"
db.Execute strSQL
strSQL = "DELETE * FROM sometable"
db.Execute strSQL
If you returned to the 2nd line after the 3rd line has executed, you'd be
deleting instead of updating....probably not what you want. Obviously, this
is a very simple example, but you could encounter a variety of issues if the
procedure were more complex. Having the ability to repeat an operation
while debugging is sometimes useful though....you just need to be mindful of
what has been done or might result.
I wrote this small procedure to test what happens with variables and it show
one of the problems with the idea of debugging backward, break on the line
inTest = 1
hit F8 a few times take the value of intTest then drag the cursor back, the
variable holds the value, not resetting it back to what is should be at that
point, so be careful with what you are debugging,
Public Sub test()
Dim intTest As Integer
intTest = 1
intTest = intTest + 1
intTest = intTest + 1
intTest = intTest + 1
intTest = intTest + 1
intTest = intTest + 1
intTest = intTest + 1
intTest = intTest + 1
intTest = intTest + 1
End Sub
Many thanks, guys. I just wanted see to again what the code just did so
this
will do it. I don't care about the data because I'm programming against a
development DB, never the production DB.
You guys are great.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.