Print Thread
Long Value during debugging
#14643 07/13/04 05:42 PM
Joined: Jul 2004
Posts: 15
OKsystem Ltd., Prague, Czech R...
P
Member
OP Offline
Member
P
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
#14644 07/13/04 10:49 PM
Joined: Aug 1999
Posts: 22,220
Member
Offline
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
#14645 07/14/04 04:35 AM
Joined: Apr 2003
Posts: 517
Portland, OR, USA
M
Member
Offline
Member
M
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
#14646 07/24/04 02:43 PM
Joined: Jul 2004
Posts: 281
The Netherlands
Member
Offline
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
#14647 11/03/05 06:50 PM
Joined: Jun 2004
Posts: 16
F
Member
Offline
Member
F
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
#14648 11/03/05 10:38 PM
Joined: Jul 2004
Posts: 15
OKsystem Ltd., Prague, Czech R...
P
Member
OP Offline
Member
P
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


Moderated by  support 

Link Copied to Clipboard
Powered by UBB.threads™ PHP Forum Software 7.7.4
(Release build 20200307)
Responsive Width:

PHP: 7.1.33 Page Time: 0.054s Queries: 12 (0.023s) Memory: 2.5195 MB (Peak: 3.0423 MB) Data Comp: Off Server Time: 2024-05-17 16:16:32 UTC
Valid HTML 5 and Valid CSS