|
Long Value during debugging
|
Joined: Jul 2004
Posts: 15 OKsystem Ltd., Prague, Czech R...
Member
|
OP
Member
Joined: Jul 2004
Posts: 15 OKsystem Ltd., Prague, Czech R... |
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
|
|
|
Re: Long Value during debugging
|
Joined: Aug 1999
Posts: 22,220
Member
|
Member
Joined: Aug 1999
Posts: 22,220 |
This is unfortunately not possible due to an Oracle Debugger limitation. Only values < 1000 bytes can be displayed.
Marco Kalter Allround Automations
|
|
|
Re: Long Value during debugging
|
Joined: Apr 2003
Posts: 517 Portland, OR, USA
Member
|
Member
Joined: Apr 2003
Posts: 517 Portland, OR, USA |
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
|
|
|
Re: Long Value during debugging
|
Joined: Jul 2004
Posts: 281 The Netherlands
Member
|
Member
Joined: Jul 2004
Posts: 281 The Netherlands |
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.
Been there, done that, Got the T-Shirt
|
|
|
Re: Long Value during debugging
|
Joined: Jun 2004
Posts: 16
Member
|
Member
Joined: Jun 2004
Posts: 16 |
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
|
|
|
Re: Long Value during debugging
|
Joined: Jul 2004
Posts: 15 OKsystem Ltd., Prague, Czech R...
Member
|
OP
Member
Joined: Jul 2004
Posts: 15 OKsystem Ltd., Prague, Czech R... |
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
|
|
|
|
|
|