When debugging a package procedure in PL/SQL developer, how do you set a CLOB in parameter value?

aape picture aape · Oct 29, 2011 · Viewed 10.9k times · Source

I'm debugging an Oracle package using PL/SQL developer, but I'm running into a problem - one of the parameters is a CLOB (it's a big ass XML string). I can pass it in from the application side and have it be a CLOB, but in the PL/SQL debugger, I put the string representation of the XML into the debugger so the proc in the package treats it as a CLOB? As it stands, when set it, then step into the package, the parameter evaluates to NULL, but the string is fine.

This is the debug setup window

Answer

davidmontoyago picture davidmontoyago · Nov 1, 2011

you can always use the pl/sql block that is invoking the SP. In this case deselect the corresponding checkbox to the CLOB parameter, then replace the calling statement with this:

declare
    myClob1 clob := to_clob('your data');
begin
    searchtrackingpolicies_split(callerid => :callerid,
                                 xmlcriteria => myClob1,
                                 xmlsearchresults => :xmlsearchresults);
);
end;

notice that the colon before myClob1 were removed.