!--a11y-->
Introduction 
In the context of SAP Enterprise applications, there are very special aspects to the remote debugging of applications.
Let us assume a specific application is deployed in a production system and is currently in use. However, there is now an error in this application. At the same time, a large number of clients are already using this application. In a situation like this, the error is to be diagnosed without having to stop the entire Java cluster. In this context, remote debugging of applications must be possible without affecting the relevant Java cluster.
Furthermore, it should be possible to control the debugging efficiently and centrally from within the Developer Studio.
Finally, users must also be able to execute remote debugging in customer systems and thus beyond the boundaries of firewalls (in a WAN).
From within the Developer Studio, you can debug applications provided they are running on the Web AS. Depending on the Web AS installation, we can differentiate between three different debugging scenarios:
(Standalone) developer workplace installation |
The Web AS is installed on the same local developer PC as the Developer Studio. By default, the debugging mode is deactivated for this single server configuration. However, the (only) server node (server0) can be switched from run mode to debugging mode. In this way, the connection to the server is completely reserved for the debugging session. The server is then stopped. |
LAN scenario |
Web AS is installed at any location in the LAN. The simple developer workplace installation can also be in effect in the LAN scenario. However, the Developer Studio and the server (including the database) are installed on different hosts. In general, a LAN will feature a cluster configuration. It defines a group consisting of several instance nodes. In such a cluster configuration, one or more server nodes can be reserved for debugging. When debugging is activated the message server deactivates the relevant server node for the cluster communication. As a result, incoming requests are no longer passed on to the reserved node. A debugging session can be executed from within the Developer Studio via the debug port without affecting the other server nodes in the cluster.
|
WAN scenario |
The Web AS runs on the customer side. Debugging takes place through firewalls using SAP Router technology. |

Note that debugging in the WAN scenario is not covered in this guide.
The SAP NetWeaver Developer Studio provides tools for debugging your Java applications. For this purpose, you can set breakpoints in the Java source code.
To enable debugging, the J2EE Engine must be running and debugging must be activated. By default, debugging is deactivated on the server. Therefore, you must activate debugging on the relevant server node.
To start the application in debugging mode, you must create a reusable debug launch configuration and then use the Debug perspective to analyze the code.

For information on using the Debugger, refer to the Java Development User Guide of the SAP NetWeaver Developer Studio documentation (Help ® Help Contents), in particular the topic Debug view.
Debugging in a Single Server Configuration
Debugging in a Cluster Configuration