What is the correct way of putting DebugInfos into loops ?.
I have a FOR loop and I want the debugger to stop when the loop is entered and each time it evaluates the loop condition
Expression.Assign(variable, <start value>)
The Loop body consists of
Expression.IfThen(Expression.GreatarThan(variable, <end value>), Expression.Goto(exitlabel))
Expression.AddAssign(variable, <step value>)
I have found the putting a DebugInfo - CloseDebugInfo arrount the Assign, Loop and exit label block gives me the behaviour I want.
However, when I coded a DO .. WHILE loop where the condition is evaluated at the end of the loop body, the debugger did not stop on the loop condition.
Isn't the correct way to put the debug block around the IfThen in the loop body ?
Also is it ok to have a CloseDebugInfo immediately after a DebugInfo ? Again this seems to work but need to check.