Eclipse Remote Debugging WebSphere Application Server

Source: Internet
Author: User
Tags websphere application server

When we use Eclipse to develop a WEB project, we use a plug-in (such as MyEclipse) to step through the application in Tomcat. To debug the application under was, MyEclipse is also OK, but booting in myeclipse was slower and needed to install a was locally. A handy way to do this is to use WSAD (Websphere Studio application Developer) or its upgraded RAD (Rational application Developer), which has a good support for was, but it also needs To this machine installed Was,wsad/rad mast body naturally needless to say. To allow Wsad/rad to debug remotely, it seems that you have to install an IBM Agent Controller on the server.

In fact, was to support the settings of remote debugging, open it, you only need to use the Remote Java application feature in Eclipse Debug to connect to the appropriate port on the server. The setup is simple, and you can even secretly debug the production environment's was application to verify that the test environment is difficult/cannot reproduce at leisure. This is done as follows (the operations under was 5.x and 6.x are essentially the same):

One: Configure was, turn on debugging services

into the management console of was (or ND), on the server-> application Server, tap the application server on which you want to enable the debugging service, and then go to the debugging service and tick the boot (specifies whether the server will attempt to start the specified service when the server starts up). )。 The JVM debug port defaults to 7777, noting that the port cannot be conflicted (if you have more than one server to enable debugging services, you need to specify a different port). Other options are default, or are set according to reality.

After the application server is identified and saved, the was Base version needs to be restarted under the operating system, and if it is under the ND Management console, restart the application server directly in the page.

II: Configuring ECLIPSE, using remote debugging

Eclipse's menu Run-> Open Debug Dialog window, right-click Remote Java application->new, and in the Conect tab on the right, select the Project you want to debug (that is, published to was With the debugging service enabled, the project that exists in your Eclipse, the Host fills in the ip,port of the was server is the previous JVM debug port. The other two tab Source/common can be noticed.

When you click the Debug button, Eclipse handles the state of the JVM debug port that listens on the was server.

Third: Hit the breakpoint, debugging application

The project in your Eclipse (note that the project has been deployed to was) has a breakpoint on the line of code to debug, and then you can browse to the application on the Web page. When you execute the line of code that is on the breakpoint, Eclipse stops on the row, giving you the F5/F6 jump, watch/inspect/display the expression or variable as usual.

Other disadvantages are:

1 The output of the console is not observed, and it depends on the SystemOut.log file or log file of was.

2 The JSP file cannot be debugged because it is not located in the original code, and this method is not smart enough.

3 after the code is updated, you need to manually copy the class file or JSP file to the corresponding directory of was.

4 Start debugging service, seriously affect the function, click on the mouse can feel, so the formal system after the end of the function quickly off.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.