Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

debugging - How do you connect an eclipse to a WebSphere Application server hosted on remote server?

I am trying to debug a local code ( which is on my laptop) using eclipse, which I am trying to connect to the remotely hosted WAS( WebSphere Application server) and remotely hosted database.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

To remotely connect to WAS, first, from the WebSphere Integrated Solutions Console:

  1. Navigate to the application server's Debugging Service:
    • Servers > Server Types > WebSphere application servers > [serverName] > Debugging Service
  2. Check the "Enable service at server startup" checkbox
  3. Add/modify the "JVM debug port" if necessary (the port must not already be in use on the server)
  4. Add/modify the "JVM debug arguments" if necessary (this may already appear by default):
    • -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=7777
  5. Apply the changes, Save the new configuration, and Restart the application server

Then, from the Eclipse IDE:

  1. Open the "Debug" dialog (e.g. Run > Debug Configurations...)
  2. Right-click "Remote Java Application" and select "New"
  3. Configure the Remote Java Application:
    1. Name the debug configuration
    2. Browse to select the project to debug (optional)
    3. Use the "Standard (Socket Attach)" Connection Type
    4. Specify the hostname of your WAS server
    5. Specify the port number that was set in the WAS debug options
  4. Click Apply
  5. Click Debug

(These instructions are for WAS 7.0, but should be similar for other versions.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to WuJiGu Developer Q&A Community for programmer and developer-Open, Learning and Share
...