如何在使用GAE Maven插件时在IDEA中调试Java Google App Engine应用程序? [英] How can I debug a Java Google App Engine app in IDEA while using the GAE Maven plugin?
问题描述
我已经像 那样设置了我的pom.xml,并且它似乎是工作的大部分,我可以启动devserver和更新应用程序。
我的问题是,我似乎无法调试devserver。我试图在IDEA中以调试模式启动devserver maven目标,但是当我设置断点时,它们被忽略。
我在GAE Maven插件文档中发现可以启动在调试模式下使用以下配置的devserver:
< jvmFlags>
< jvmFlag> -Xdebug< / jvmFlag>
< jvmFlag> -agentlib:jdwp = transport = dt_socket,address = 8000,server = y,suspend = n
< / jvmFlags>
然而,我不知道如何告诉IDEA连接调试器,当我启动Maven Run /调试配置。
任何人都可以指出我正确的方向吗?
在你的问题中提到的配置看起来不错。所以,你有:
< jvmFlags>
< jvmFlag> -Xdebug< / jvmFlag>
< jvmFlag> -agentlib:jdwp = transport = dt_socket,address = 8000,server = y,suspend = n
< / jvmFlags>
-
当您运行Maven构建版本
mvn appengine:devserver
<在某些时候它暂停并等待远程调试器连接。在IDEA中,转到运行>
编辑配置... 并添加新的远程配置。 - 给它一个名称和检查参数
- 点击确定 >
- 用
Run>运行调试器。调试'<您的配置名称>'
(Shift-F9
)
I have set up my pom.xml like so, and it appears to be working for the most part, I can start the devserver and update the application.
My problem is that I can't seem to debug the devserver. I tried launching the devserver maven goal in debug mode from within IDEA, but when I set breakpoints they are ignored.
I found in the GAE Maven plugin docs that you can launch the devserver in debug mode with the following configuration:
<jvmFlags>
<jvmFlag>-Xdebug</jvmFlag>
<jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
</jvmFlags>
However I don't know how to tell IDEA to connect the debugger when I start the Maven Run/Debug configuration.
Can anyone point me in the right direction?
The configuration mentioned in your question looks good. So, you have:
<jvmFlags>
<jvmFlag>-Xdebug</jvmFlag>
<jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
</jvmFlags>
When you run your Maven build
mvn appengine:devserver
at some point it halts and waits for the remote debugger to connect.
In IDEA, go to
Run > Edit Configurations...
and add a new Remote configuration.- Give it a name and check parameters (especially the port).
- Click OK
- Run the debugger with
Run > Debug '<name of your config>'
(Shift-F9
)
这篇关于如何在使用GAE Maven插件时在IDEA中调试Java Google App Engine应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!