3 Replies Latest reply on Nov 28, 2012 2:12 PM by thatJeffSmith-Oracle

    How to Debug Procedure

      Oracle 11g R2.
      OS:SUSE Linux 11.
      SQL Developer 3.2.09.

      I want to step over the procedure's codes, line by line, when the procedure is triggered by the front end.

      For example:

      JAVA: call = conn.prepareCall("? = call pkg_test.f_test(?, ?)}");

      ORACLE: f_test



      I did placed a break point on line one, but it never stopped there at runtime. I want it to stop at line1 then I can click on a step over icon to step over line by line at the runtime. How to do it?
        • 1. Re: How to Debug Procedure

          learned something new today


          Edited by: Marwim on 28.11.2012 17:39
          Removed first answer
          • 2. Re: How to Debug Procedure
            Jim Smith
            Look at the remote debugging section in the online help. (Although I don't think the help section makes it very clear.)

            Essentially you need to set up SQL Developer debugger to listen and then in the remote code you have to connect to the debugger using dbbms_debug_jdwp.connect_tcp('your sql developer workstation','debugger port'.

            If you can't modify the remote code to include a call to dbms_debug_jdwp, then I'm afraid there is nothing you can do.

            Edit to add:

            Also make sure you have compiled for debug and that your breakpoint is on an executable line (i.e. not a declaration)

            Edited by: Jim Smith on Nov 28, 2012 12:24 PM
            1 person found this helpful
            • 3. Re: How to Debug Procedure
              No need to modify the remote code, you can alternatively set an OS environment variable to accomplish the same

              ORA_DEBUG_JDWP=host=mypc:port= 1234
              1 person found this helpful