This article describes how to use JPDA (Java Platform Debugger Architecture) and an IDE (Eclipse) to remotely debug a Java application of Java based web service.
1. Pass in parameters to start up script
-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8001
2. start web app or java application
3. In Eclipse, under the service to debug (e.g. bsrouter), select Run -> Debug Configurations...
4. Right-click on Remote Java Application and select New
5. Specify the service to attach to:
Project: where the source code is located
connect type: standard(Socket Attach)
host:
port:
same as what's defined on server side
6. launch debug and set break point
No comments:
Post a Comment