9 Replies Latest reply on Jan 20, 2015 8:15 PM by thatJeffSmith-Oracle

    Debugging in SQLDeveloper: how can I watch the entry of variables in a subprocedure in a stored procedure?


      SQLDeveloper Version and

      Oracle Database Version

      Windows7 with Oracle Client Version


      I try to debug a stored procedure with sqldeveloper and want check the entries of the variables during the run. I can do this in DATA, WATCH and SMARTDATA if the code is in the main part of the stored procedure.

      If the code is part of a sub procedure I see nothing in DATA or SMARTDATE and only Question marks in WATCH in the field "value" or "type". If the variables are defined in the subprocedure than I can see them in DATA or SMARTDATE and I see correct entries in WATCH.

      Can you say me how I can see the entries of the variables in DATA, SMARTDATA or WATCH even if I not extra defined them in the sub procedure (this is very annoying and makes the SP bigger and bigger).


      You can test it with following SP

      create or replace

      procedure      stuerk_debug

      (   i_start_number      number              -- IN , Tabelle



         v_a number(10) ; 

         v_b number(10) ; 

         v_c number(10) ; 


         k1  number(10) :=6;


      --  Prozedur Test - no varibales in DATA or SMARTDATA using variables which are not defined in the subprocedure


      PROCEDURE sdebug_nodata



        v_a :=i_start_number + k1;

      end sdebug_nodata; 

      procedure sdebug_data


        v_x number(10);

        v_xk1 number(10);



        v_x :=i_start_number + v_xk1;

      end sdebug_data;


      --  MAIN Session



        v_b :=i_start_number + k1;



      end stuerk_debug; 


      And here a picture of WATCH when I execute a statement in the sub procedure sdebug_data. There is a valid entry for v_x which is defined in this sub procedure but there is no valid entry for v_a, which is only defined in the main procedure.



      Thanking for any help

      Brigitte Türk