8 Replies Latest reply: Sep 30, 2013 1:47 PM by CraigB RSS

    Can you "debug" a form when running on the App. Server?

    user12240205

      We recently got a project to do defect fixing of a Oracle Forms 10g application.

       

      They have given us each developer a VM with an app. server, source code etc.

       

      Problem is, we cannot run the form using the Form Builder.

       

      They want us to always make changes to the form, deploy in the app. server and run the form using the Application Menu.

       

      Problem is, how can we do line-by-line debugging in a situation like this?

       

      Normally, we would press the "Run form debug" button to run the form in Forms developer in debug mode.

       

      What is the solution?

      Should we ask the owners to give us permission to run the form from Developer?

      Or, is there way to do debugging a form when running from app. server?


        • 1. Re: Can you "debug" a form when running on the App. Server?
          Michael Ferrante-Oracle

          The Forms Debugger can attach to remotely running forms.  Start the form with the debug=yes option.  A dialog will be displayed with a host and port number.  In the Builder, select the "Attach Debug" option from the menu.  You will be asked to enter the information provided by the runtime.  The running form and Builder debugger will now be attached to each other.  Ideally, you would have a break point in the form so you can stop processing easily.

           

          Refer to the Builder's online help for more information on how to use the debugger

          • 2. Re: Can you "debug" a form when running on the App. Server?
            user12240205

            Hi Michael,

             

            How would we do it if we are calling the form using a CALL_FORM?? Before the call_form built-in I added a text para called DEBUG with value to "Yes", then it gave error saying form has no parameter called debug?

             

            Also, If you are debugging a form and that form calls another form using either call, open or new_form, will the debugger go to the called form in debug mode?

            • 3. Re: Can you "debug" a form when running on the App. Server?
              CraigB

              What is your Forms version?  Only web deployed Forms can be remote debugged (eg; Forms 9i and higher).  I know Forms 6i can be deployed to the web, but I don't recall if there was a remote debugging option in the Forms 6i Forms builder.

               

              If you are using Forms 9i or higher, take a look at My Oracle Support article: Debugging Applications Remotely [ID 221399.1].

               

              Craig...

              • 4. Re: Can you "debug" a form when running on the App. Server?
                user12240205

                Craig,

                 

                Forms version is 10g.

                 


                • 5. Re: Can you "debug" a form when running on the App. Server?
                  user12240205

                  HI Guys,

                   

                  I started debugging, but when I encounter a DB stored package procdure and press F7 it is prompting me with an Open File dialog box.

                   

                  Why is this?

                   

                  When we are debugging, it goes into PLL package procedures, but can it go into a DB package procedure?

                   

                  Your advice would be greatly appreciated.

                   

                  Thanks in advance......

                   


                  • 6. Re: Can you "debug" a form when running on the App. Server?
                    CraigB

                    user12240205 wrote:

                     

                    ...

                    I started debugging, but when I encounter a DB stored package procdure and press F7 it is prompting me with an Open File dialog box.

                     

                    Why is this?

                     

                    When we are debugging, it goes into PLL package procedures, but can it go into a DB package procedure?

                     

                     

                    Unfortunately, no; you can't debug database objects using the Forms debugger.  For that you would have to use a third party debugger such as SQL Developer, TOAD, or PL/SQL Developer.

                     

                    Craig...

                    • 7. Re: Can you "debug" a form when running on the App. Server?
                      user12240205

                      So Craig, why is it prompting me with a File Open dialog box when it tries to run a DB procedure?

                       

                      What does the Forms debugger supposed to do? Run it and bring back result?

                      • 8. Re: Can you "debug" a form when running on the App. Server?
                        CraigB

                        user12240205 wrote:

                         

                        So Craig, why is it prompting me with a File Open dialog box when it tries to run a DB procedure?

                         

                        What does the Forms debugger supposed to do? Run it and bring back result?

                        Because Forms doesn't know how to load the object so it is prompting you to open it.  However, since the Forms debugger can't read the source of the database program unit (procedure, package, function) - you can't debug it from Forms.  At least, I've never been able to do it and I've tried making Forms open a source file for a database program unit.  It basically boils down to the fact that Oracle Forms can only debug objects that are within the scope of the Forms runtime/builder and database program units are not contained within the Forms objects (eg; Forms binary, PL/SQL Library or Menu Module binary).  I recommend you "Step-Over" any call to a database program unit when you encounter them in the Forms debugger.  The database program unit will take longer than normal to run, but it will eventually finish and take you to the next line of code to be executed.

                         

                        Craig...