Is this a debugger problem

ScottMattes

Member³
A co-worker and I just saw something 'interesting'. He asked me to explain how this

var1 := rcd.fld1;
var2 := rcd.fld2;
var3 := rcd.fld3;
var4 := var1 || var2 || var3;

could result in var2 not having a value when the cursor is hovered over it.

var2 is defined twice in the package, but obviously in different scopes.

we put a "dbms_output.put_line( var2 );" right after the "var2 := rcd.var2" and ran until just after the put_line, we killed the execution and saw the expected var2 value on the output tab. We also saw the value of var2 in var4.

is this some known Oracle debugger problem?
 
I'm not aware of such a problem. You should always see the variable value as defined in the scope of the current execution line.

Is this variable defined twice in multiple declare sections within the same subprogram?
 
Yes, it was defined twice in the same sub-program of the package. Though the hover didn't show the value, a DBMS_OUTPUT.PUT_LINE and var4 do show that var2 had a value.
 
Back
Top