Skip to Content
avatar image
Former Member

Remote debugging on WAS 6.20

Hi,

we are running the developer studio for our ISA development on WAS 6.20.

Unfortunately the remote debugging doesn't seem to work, at least not as easilly as hoped. Hopefully this is because of lack of information rather than a non-working product. Hence below are the steps and associated questions:

I Go to Window --> preferences. Select SAP J2EE Engine.

The "...is installed on local host" option, when pressing Browse, only gives an error saying that "No local engine could be found!" and then a few sentences indicating that this would only work on unix using a standard path. This of course does not help for local Windows development.

The second option is to select the "...installed on remote host". This would be fine, but as far as I understand I don't have a messaging server if I am running the WAS 6.20 locally.

Question: If I can use this option for the locally running WAS then what should I put it in the message server host and port?

When this fails the alternative is to go to the server root, open up the \configtool\configtool.bat and tick the debug mode for the server on and set the port to for example 9999.

After this I switch to debug mode in the studio and select Run --> debug... from this screen double click on remote java application and fill in the connection properties with localhost and 9999.

Unfortunately this also ends up in "failed to connect to remote VM".

Are we going down the wrong path here or just missing something in this? I didn't expect it to be very difficult to set the remote debugging in place.

Thanks for any comments!

Cheers,

Kalle

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Sep 10, 2004 at 09:01 AM

    Thank you for the clarification!

    Unfortunately the guidelines you gave are not applicable for a couple of reasons:

    ENABLEDEBUG -true gives an "Can't find command 'ENABLEDEBUG'." Error.

    WAS 6.20 SP25 doesn't seem to exist yet on the GA market (refer to note 635453 "SAP J2EE Engine 6.20 Release Information").

    Would it be possible for you to send me the mentioned document?

    Apart from this I was able in the Developer Studio to attach the IDE to the WAS 6.20 VM through the debug port, but when trying to execute the jsp I get an "Failed to connect to the remote VM." exception.

    I am also not complete sure if we are trying to achieve the same thing as I want IDE integrated debugging, but understanding from your point number 5 it could be read that you mean that we would get debug output in the browser, which we of course can't use, but you might mean the IDE, the document would help 😊

    Cheers,

    Kalle

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Kalle,

      you are right - I've missed the point that you're trying to attach the IDE through the debug port (I thought you want to do this through the Developer Studio integration for the engine). Sorry about that!

      Now when I get to your original post, I see that you used the config tool to set the debug mode. Then you need to restart the server, so that the JVM is started with the debug properties.

      Then you should be able to attach the IDE to the engine and debug the application.

      Good luck.

      P.S. Forget about what I've written in the previous post - it's a different thing.

      P.P.S. The "Can't find command 'ENABLEDEBUG'." error is not a bug 😊) - in fact, I was a bit short in the explanation. First, ADD DEBUG must be executed to add the ENABLEDEBUG command to the environment, and then execute the command itself. Just FYI 😊

  • avatar image
    Former Member
    Sep 09, 2004 at 02:17 PM

    Hi Kalle,

    yes, the remote debugging is possible on J2EE Engine 6.20. The process is basically the following:

    1. Deploy the application on the server

    2. Suspend a server (this means, isolate it from load balancing productive requests to it while debugging). To that, you execute the SUSPEND shell command in the console.

    3. Enable debugging on the dispatcher by executing the <b>ENABLEDEBUG -true</b> command in the dispatcher's console.

    4. Initiate a debug session by requesting the server with the special debug token: http://host:port/@@@DEBUG@@@.

    5. Request the application as usual (e.g. http://host:port/<appcontext>/<servletpath> and you should get debug info on the screen.

    For more information, refer to the Administration manual of the J2EE Engine 6.20, chapter Configuration Tasks -> Setting up SAP J2EE Engine 6.20 for Remote Debugging. <b>Note: Use the documentation that comes with the J2EE Engine 6.20 PL25. There, the debugging section was updated. Previous versions contain some glitches in the description of the debugging process.</b>

    Hope that helps!

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Sep 10, 2004 at 11:31 AM

    Thank you for getting this sorted.

    Just for sake of re-assurance to others who are trying this. It will work, but there are a few things to be aware of.

    1. When I did the http://localhost:port/@@@DEBUG@@@

    the debugsession screen had an empty port.

    I fixed this by using the configtool and setting the port there.

    Next time it then worked.

    If you use the developer studio the only things you need to do to start the debugging is to select the debug icon --> Debug... and in there create a new remote application.

    In the remote application set the server name and port (for me it was localhost and I defined in the deploytool the port to be 12800).

    After that hit debug and you can see that you are connected to the server. If you are not then restart the server and try again.

    After you have the server running and you try to run, from the IDE a JSP you will get an error, but when you access the application through the browser your IDE will pick that up and off you go!

    The rest should now be standard debugging...

    Add comment
    10|10000 characters needed characters exceeded