Show TOC Start of Content Area

Procedure documentation Preparing the Debugging Process  Locate the document in its SAP Library structure

Prerequisites

The following prerequisites must be met for you to be able to create a Java debug connection:

     The server process chosen for debugging is not behind a firewall (or else, you are using the SAP Router technology).

     The Java source files in the J2EE projects have the same versions as the source files of the classes deployed on the J2EE Engine.

Your breakpoint icons are shown with a tick icon if the current version of a class you want to debug is already loaded on the J2EE Engine.

Configuring the J2EE Engine Settings in the SAP NetWeaver Developer Studio

       1.      Choose Window à Preferences and then choose the entry SAPJ2EE Engine on the left of the screen.

This graphic is explained in the accompanying text

       2.      Specify the installation option.

You can generally choose between the two options: remote installation and local installation (as described in the table below).

Installation Option

Description

SAP J2EE engine is installed on remote host

Used when the J2EE Engine is running on a remote host (it can be used for the local host too).

You must enter the message server host and port. You can find the current value of the port from the value of the rdisp/msserv property in the /usr/sap/j2e/SYS/profile/J2E_SCS<instance number>_<host name> file. <instance number> is the number of the current Java instance, for example 01. <host name> is the DNS name of the J2EE Engine host.

SAP J2EE engine is installed on local host

Used when the J2EE Engine is installed on the local physical machine.

You must select a local installation. When you choose Browse the SAP NetWeaver Developer Studio shows all local SAP systems detected. Choose the one you want to connect, and all necessary settings for it (system name, J2EE instance number and SCS instance) are filled automatically.

       3.      Choose OK to save your settings. 

 

Setting up the J2EE Engine for Debugging

...

       1.         Start the Config tool and connect to the J2EE Engine database.

       2.         In the left pane, unfold the instance which the process belongs to, and then select the process node.

       3.         In the right pane, enter the Debug tab.

       4.         Make sure the Debuggable property is checked (it is checked by default).

This step corresponds to Stage 1 in isolating the nodes for debugging (see Getting Started).

       5.      (For cluster configurations only) Check the Enabled debug mode and Restricted load balance properties (they are unchecked by default).

This is Stage 2 in isolating the nodes.

       6.      Make sure the Debug port property contains a valid debug port value.

Note

If you have more than one debuggable node, make sure each of them uses a different debug port.

       7.         Choose Apply changes in the toolbar.

       8.         In the J2EE Engine view of the SAP NetWeaver Developer Studio, select the server process you want to debug and choose Enable debugging of process from the context menu.

This corresponds to Stage 3.

The J2EE Engine is automatically restarted, which may take some time.

       9.         (For cluster configurations only) In the J2EE Engine view again, select the target process and choose Reserve process for debugging from the context menu.

This corresponds to Stage 4.

Note

All properties described here are static, that is, they are not changed after the server process is restarted, and you need to set them only once. However, you need to use the Reserve Process for Debugging command after each restart of the J2EE Engine.

If you have done all steps correctly, you will see the following status in the J2EE Engine view:

Property in the J2EE Engine view

Value

Corresponds to Property/Command

Productive Use

NO

Debuggable

Restricted Load Balancing

YES

Restrictred load balance

Debug Mode

ON

Enabled debug mode

State

Debugging

Enable debugging of process

Caution

The Debug view in the SAP NetWeaver Developer Studio may show deceptive debug results if you have not taken some of the steps above. If there is a valid debug for the process, the Debug view may show debugging results even if the other settings have not been configured. Hence, always use the J2EE Engine view to check if remote debugging is enabled, not the Debug view.

End of Content Area