Vertx redeploy feature can not debug if it is run from the Launcher

时间秒杀一切 提交于 2019-12-13 03:46:10

问题


from http://vertx.io/docs/vertx-core/java/

the Live Redeploy section.

java io.vertx.core.Launcher run org.acme.MyVerticle --redeploy="**/*.class"  --launcher-class=io.vertx.core
.Launcher -cp ...

Then if I want to debug MyVerticle from IDE (IntelliJ IDE) I can not not do it. Seems the launcher launch it out of the "context" in different class loader?..

The question is: How to debug a Verticle in IDE that was launched by the Launcher ?


回答1:


This is explained in the Live Redeploy section of the docs:

To debug your application, create your run configuration as a remote application and configure the debugger using --java-opts. However, don’t forget to re-plug the debugger after every redeployment as a new process is created every time.

So adding something like this should do the trick:

--java-opts="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005"



回答2:


I have the same problem. I guess it is a bug. In the interim I use the deprecated io.vertx.core.Starter for debugging instead of io.vertx.core.Launcher. I know that this answer isn't really satisfactory, but maybe it will help temporarily.



来源:https://stackoverflow.com/questions/47366849/vertx-redeploy-feature-can-not-debug-if-it-is-run-from-the-launcher

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!