Remote debugging a Java application

前端 未结 6 1822
我在风中等你
我在风中等你 2020-11-22 07:24

I have a java application running on linux machine. I run the java application using the following:

java myapp -Xdebug -Xrunjdwp:server=y,transport=dt_socke         


        
6条回答
  •  孤街浪徒
    2020-11-22 08:00

    Steps:

    1. Start your remote java application with debugging options as said in above post.
    2. Configure Eclipse for remote debugging by specifying host and port.
    3. Start remote debugging in Eclipse and wait for connection to succeed.
    4. Setup breakpoint and debug.
    5. If you want to debug from start of application use suspend=y , this will keep remote application suspended until you connect from eclipse.

    See Step by Step guide on Java remote debugging for full details.

提交回复
热议问题