Debugging - 'Set variable' not working

nickross

Member
I'm trying to debug a piece of code which contains conditions like :

IF var_x = 'Y' THEN...

I have been ussing 'Set Variable' to set var_x to 'Y' - but when I step into the line of code it is executed as if the two sides of the condition are not equal (?).

var_x is show as 'Y' in the Watch Items window, and if I mouse over but the condition is not treated as being True...

Does this 'Set variable' feature not work ?
 
No; doesn't look like it.

When the debugger encounters the IF/THEN statement and doesn't go inside it - as it should - it steps onto the first line of logic after the END IF statement.
 
Marco - the example code was simplified... it's actually :

IF var_x = var_y THEN...

where var_y has a value of 'Y'.

If you see what I mean.
 
I'm talking about the value you assign to one of the variables with the "Set Variable" function. If you enter 'Y', the quotes end up in the value, and the comparison will evaluate to False. If you enter Y (without the quotes) it will evaluate to True.
 
Back
Top