Debug my web application using ant

2019-02-25 07:23发布

I am currently developing an MVC Application using Java EE Technologies and Eclipse as an IDE. To run my server and deploy my application I am using ANT. I would like to know how can I debug my Java Code through the ant tool or eclipse.

2条回答
Bombasti
2楼-- · 2019-02-25 07:59

Add the following jvmarg options to your tomcat start command:

<jvmarg value="-Xdebug"/>
<jvmarg value="-Xrunjdwp:transport=dt_socket,address=5000,server=y,suspend=n"/>

You will be able to attach the Eclipse debugger on port 5000, using the Remote Java Application debug category.

查看更多
霸刀☆藐视天下
3楼-- · 2019-02-25 08:03

You can do that from eclipse:

See here for details.

But it is not a good idea to use ant to start tomcat in development. Use Eclipse WTP to start your tomcat and deploy applications on it.

查看更多
登录 后发表回答