问题描述
我使用的是s / o代码,它是由maven构建的一个java webapp。 webapp由maven脚本运行,如下所示,该应用程序在localhost:8080上运行:
I'm using s/o code, it's a java webapp built by maven. The webapp is run by maven script, like below, and the app is run on localhost:8080, :
<build>
<plugins>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>8.1.8.v20121106</version>
<configuration>
<contextPath>/</contextPath>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<!--<port>8085</port>-->
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
<stopKey>stop</stopKey>
<stopPort>8089</stopPort>
</configuration>
</plugin>
</plugins>
</build>
我想附加IntelliJ的调试器,以便我可以浏览代码。我试图设置一个调试器配置,如:Jetty Server,然后是Remote,但是它表示Application Server未指定。我也尝试使用'本地',它说'主配置文件不包括'。
I want to attach the debugger of IntelliJ so that I can step through the code. I tried to set up a debugger configuration like: Jetty Server, then 'Remote' but it said Application Server not specified. I also tried with 'Local', it said 'main config file not included'.
那么我该怎么办来附加调试器?
提前感谢
So what must I do to attach the debugger?Thanks in advance.
推荐答案
最简单的方法是在Maven项目选项卡中扩展项目,然后展开插件/ jetty,右键单击jetty:运行并选择Debug。
The easiest way is to expand your project in the Maven Projects tab, then expand Plugins/jetty, right-click jetty:run and select Debug.
这篇关于在IntelliJ中调试Web应用程序,由maven构建的webapp,由jetty运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!