I can't single step through my IF ENDIF statements.
Correct. They don't allow for this.
──────────────────────────────────────────────────────────────────────────────
The first thing you should know is that the IF..ELSEIF..ELSE..ENDIF
construct is NOT identical to the DO CASE..ENDCASE construct.
The IF..ELSEIF..ELSE..ENDIF is similar to the DO CASE construct in that you
both may execute one of several statements depending on the outcome of an
expression.
The main difference between the two is that when an IF..ELSEIF..ELSE..ENDIF
construct is compiled, the line numbers are not stored within the object
module so when you come to debug them, the debugger can only show the top
line of the construct and then the program jumps straight to the statement
following the first .T. evaluation.
The DO CASE..ENDCASE construct has line numbers stored with each CASE line
in the object module and therefore you are able to single step through a
DO..CASE..ENDCASE construct without any 'sudden jumps'.
You may get around this problem by replacing your IF..ELSEIF..ELSE..ENDIF
constructs with DO CASE..CASE..OTHERWISE..ENDCASE statements.
Or, you may compile your application by including the MrDebug.Ch file - in
which IF..ELSEIF..ELSE..ENDIF constructs will be pre-processed into DO
CASE..CASE..OTHERWISE..ENDCASE statements
To summarize.... if you include MrDebug.Ch in a .prg then all
IF..ELSEIF..ELSE..ENDIF constructs will be replaced with
CASE..CASE..OTHERWISE..ENDCASE constructs.