Long Value during debugging

Peter Kriha

Member²
During debugging my PL/SQL package, when I want to see the content of VARCHAR2 variable containing text longer than 999 characters, I see the text "Long value" instead.
Is there any way how to see the right content of such variables?
The version of my PL/SQL developer is 5.1.4.730.

Thanks, Peter
 
This is unfortunately not possible due to an Oracle Debugger limitation. Only values < 1000 bytes can be displayed.
 
It seems obvious, but just in case you are too focused on the debugger to see it and really mean "any" way...Just temporarily modify the code to dump the value into a temporary table with a long column for the text and creation date. Then commit it immediately after the insert.

Put a break point after the commit in the debugger. Open a SQL window and select the text sorted by the creation date for multiple iterations and there it is.

Cheers,

Mike
 
I would not put in a commit in such a way, as it might commit other data changes prior to the breakpoint.
The correct way of doing this would be to create a private procedure in the package using 'pragma autonomous_transaction'. Pass the long value to this procedure and perform the insert and commit in the procedure.
 
the best resolution I found is splitting up the variable only for debugging
v_test1 := substr(v_statement, 1 , 950);
v_test2 := substr(v_statement, 951, 950);
v_test3 := substr(v_statement,1990, 950);

I'm not satisfied with this, but I don't know a better one

Chris
 
Hi Frido,
I agree with you. I have been using your solution for more than one year. It is safe and without any side effects, though a bit elaborate.
Do you know if the limitation of 999 chars still exists in the newest version of Oracle RDBMS?

Peter
 
Back
Top