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

Categories

0 votes
1.2k 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 Reply

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.)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...