9 Replies Latest reply: Jan 29, 2013 1:08 PM by 987318 RSS

    DEBUGGING deployed war from JDeveloper


      I am running from JDeveloper Run->Debug Server Instance.
      Now the only thing I want is to able to debug my deployed war.
      Please note that I do not have any specific .java that contains Main.
      So, cannot just right-click on a java and click on Debug.
      I want to able to debug the WHOLE application, which is deployed as war.
      This should be about Remote Debugging.


      If you need to know, this is an applet application, but going to .html file and clicking on Debug,
      does not work neither. Because in this case does not deploy any thing, just try to run the html.
      And if I deploy the war before doing this, it gives me error that I already have the context-root.

      Edited by: 984315 on Jan 26, 2013 7:55 AM

      Edited by: 984315 on Jan 26, 2013 7:56 AM
        • 1. Re: DEBUGGING deployed war from JDeveloper
          Timo Hahn
          User, please tell us which jdev version you are using.

          What happens if you set a break point in a class your applet uses?
          Then when you run the the applet (by using the URL to reach the html where the applet is embedded) and you call code where you have set the break point the execution should hold and you can step through the code.

          • 2. Re: DEBUGGING deployed war from JDeveloper
            Jdev version: 11 Release g2

            Nothing happens in case of putting a breakpoint, which is global moreover.
            I am deploying war to the Integrated Server (Weblogic) that is run in Debug Mode.
            I am running it also within the JDeveloper.
            And from a browser, I am reaching to the url, and Applet is running.
            And does not stop in any breakpoint. It just runs and keep going.

            • 3. Re: DEBUGGING deployed war from JDeveloper
              Timo Hahn
              For a test, you can add a line like
              int i = 5/0;
              and call this line via a button click. Start the server in debug mode and run your applet. Navigate to the button and click it.
              This will get you a nice NPE at this line. Now you should see a stack trace in the log window. Click on the line where the NPE happened. Now you should be able to set break point at other positions. Start the applet again and see if the other break points are working now.

              • 4. Re: DEBUGGING deployed war from JDeveloper
                As I told, Debugger does not care about the breakpoints.
                Does not respond in the way I told.
                I'm trying to find the way that breakpoints work.
                • 5. Re: DEBUGGING deployed war from JDeveloper
                  Timo Hahn
                  Have you read the doc
                  and for debug

                  • 6. Re: DEBUGGING deployed war from JDeveloper
                    Yes I had already read.
                    So, it seems that I continue with the oldest debug method: Print.
                    Thanks anyway.
                    • 7. Re: DEBUGGING deployed war from JDeveloper
                      Dimitar Dimitrov
                      What I understand is that you want to debug an applet. Applets do not execute within the application server. They are executed by the JVM of the local browser (e.g. by the browser's Java Plug-In) locally on the workstation. You should attach your debugger to this JVM instead of the application server's JVM. (You cannot debug an applet by right-clicking the Web application in JDeveloper and starting it in debug mode, because in this way you attach the debugger to the application server's JVM (e.g. to WebLogic's JVM) but not to the browser's JVM).

                      In order to debug an applet you should configure the browser's Java Plug-In to start in a debug mode and then you should attach a Java debugger to it. You can use either a standalone Java debugger or the debugger integrated in JDeveloper IDE. Have a look here for instructions:

                      [url http://docs.oracle.com/javase/6/docs/technotes/guides/plugin/developer_guide/debugger.html#how]How to Debug Applets in Java Plug-in
                      [url http://docs.oracle.com/cd/E16162_01/user.1112/e17455/run_debug_java.htm#BABBDICF]Debugging Remote Java Programs in JDeveloper

                      • 8. Re: DEBUGGING deployed war from JDeveloper
                        Actually, because of that in my first post I had written this:

                        "This should be about Remote Debugging."

                        But the answers hadn't come in this way.
                        I had tried to configure JDeveloper for remote debugging.
                        But the thing that I didn't know was that I also should configure Java Plug-In.
                        I will try it, and post the result.
                        Thank you very much.
                        • 9. Re: DEBUGGING deployed war from JDeveloper

                          Finally I succeeded it, after giving some parameters to JVM: -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000
                          and configure the projects to connect on debugger on 4000.

                          Thanks for the answers.