3 Replies Latest reply on Sep 17, 2018 10:27 AM by VikasSh

    Debug in ORDS

    VikasSh

      Hi All,

       

      Can somebody guide me the best way to debug the code execution like we do using DBMS_OUTPUT.put_line with ORACLE ORDS. I tried with htp.p but i dont see the output in body or header.. I have seen htp.p example

      but i dont know where it gets print.

      current i am doing it uisng as response by putting it as out variable. i have also written a DEBUG procedure which i call with in my packages i called through using rest handler. I use ORDS Standlone with SQLDeveloper and not  using APEX or OWA.

       

        • 1. Re: Debug in ORDS
          thatJeffSmith-Oracle

          So I'd start by just using the pl/sql debugger to step through create_employee().

           

          You could also use dbms_output, but SQL Developer also supports OWA and DBMS output capturing for your session, just open the panels for each.

          • 2. Re: Debug in ORDS
            thatJeffSmith-Oracle

            Also, if you wanted to debug this in ORDS, you would need to create a restful service that invokes create_employee, and passes the values for the new employee.

             

            Then call with cURL or use a client like POSTMAN

             

            If you get a 200, all is 'good' - you should see your new employee in the table. If not, then the HTP.P will come in handy

             

            I have an example here

            • 3. Re: Debug in ORDS
              VikasSh

              Thanks Jeff. This was helfpul.

               

              Also, when we save RestHandler The code only get check for syntex errors. Not for for Indentifier or object errors. for eg if i write

               

              open :resultset from Select * from < non exsisting table > 

               

              does not show error while saving  but give error when URL is call. ie at run time. That will save time. May be it might get updateed in coming releases.   

               

              Vikas.