问题
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