如果从Launcher运行Vertx重新部署功能,则无法进行调试 [英] Vertx redeploy feature can not debug if it is run from the Launcher

查看:1032
本文介绍了如果从Launcher运行Vertx重新部署功能,则无法进行调试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

来自 http://vertx.io/docs/vertx-core/java/

实时重新部署部分。

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

然后,如果我想从IDE(IntelliJ IDE)调试MyVerticle我不能不这样做。似乎启动器在不同的类加载器中从上下文中启动它?..

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

问题是:如何调试启动器启动的IDE中的Verticle ?

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

推荐答案

这在实时重新部署部分:


要调试应用程序,将您的运行配置创建为远程
应用程序,并使用--java-opts配置调试器。但是,
不要忘记每次重新部署后重新插入调试器,因为每次都会创建一个新的
进程。

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"

这篇关于如果从Launcher运行Vertx重新部署功能,则无法进行调试的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆