Eclipse Remote Debugging WebSphere application Server (WAS)

Source: Internet
Author: User
Tags websphere application server

When we developed a WEB project with Eclipse, we used a plug-in, such as MyEclipse, to step through the apps in Tomcat. MyEclipse is also possible to debug an application under was, but it is slower to start in MyEclipse and requires a was to be installed locally. The easy way to do this is with WSAD (Websphere Studio application Developer) or its upgraded RAD (Rational application Developer), which has built-in support for was, but also requires To the machine installed Was,wsad/rad hypertrophy of the body is not to say. To get Wsad/rad to debug remotely, it seems that you have to install an IBM Agent Controller on the server.

In fact, was is a setup that supports remote debugging, and you just need to connect to the appropriate port on the server using the Remote Java application feature in Eclipse Debug. The setup is simple, so you can even secretly debug your production environment's was application at leisure to verify that the test environment is difficult/impossible to reproduce. Here's how it works (basically the same thing as under was 5.x and 6.x):

   One: Configure was to open the debugging service
Into the was (or ND) management console,Server-Application Server, click the application server for which you want to enable debugging services, and then enterCommissioning Services, tick theStart(Specifies whether the server will attempt to start the specified service when the server starts.) )。JVM Debug PortThe default is 7777, note that the port must not have a conflict (if there are multiple servers to enable debugging services, you need to specify a different port). The other options are default, or are set according to the actual.
DetermineSaveAfter restarting the application server, the was Base version needs to be restarted under the operating system, and if it is under the ND Management console, the application server can be restarted directly on the page.

Two: Configuring Eclipse, using remote debugging
Eclipse's MenuRun-Open Debug Dialogwindow, right-clickRemote Java Application-New, on the right ofConecttab, select the page you want to debug.Project(That is, a project that exists in your Eclipse that was published to the debug service under was),HostFill in the IP of the was server,PortIs the front JVM debug port. Two more tabsSource/CommonBe aware of it.

Click the Debug button, at which time Eclipse is processing the state of the JVM debug port listening on the was server.
  
  Three: Hit the breakpoint, debug the application
  
In your Eclipse project (note that the project was deployed to was), place a breakpoint on the line of code that you want to debug, and then browse to the app on the Web page. When you execute the line of code where the breakpoint is located, Eclipse will stop on that row, allowing you to f5/f6 the jump as you normally would watch/inspect/display the expression or variable.

  Other drawbacks are:
1) The output of the console is not observed, and the SystemOut.log file or log file of was is also seen.
2) JSP files cannot be debugged, because the source code is not located, and this method is not smart enough.
3) After the code update, you need to manually copy the class file or JSP file to the appropriate directory of was.
4) Start the commissioning service, seriously affect the function, through the mouse click can feel, so the formal system after the event hurriedly shut down the function.

Eclipse Remote Debugging WebSphere application Server (WAS)

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.