简体   繁体   English

Maven Jetty调试的问题-Eclipse(断裂点被跳过)

[英]Issue with Maven Jetty Debug - Eclipse (Breakpoints are getting skipped)

I am trying to debug maven project with Jetty server in eclipse (Spring Tool Suite Version: 3.4.0). 我正在尝试使用Eclipse中的Jetty服务器调试Maven项目(Spring Tool Suite版本:3.4.0)。 I have added the below in my POM.xml 我在我的POM.xml中添加了以下内容

-javaagent:"${settings.localRepository}/org/springframework/spring-instrument/${spring.version}/spring-instrument-${spring.version}.jar" -agentlib:jdwp=transport=dt_socket,server=y,address=8000,suspend=n -javaagent:“ $ {settings.localRepository} / org / springframework / spring-instrument / $ {spring.version} / spring-instrument-$ {spring.version} .jar” -agentlib:jdwp = transport = dt_socket,server = y,address = 8000,suspend = n

MAVEN_OPTS MAVEN_OPTS

-Xmx512m -XX:MaxPermSize=256m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y -Xmx512m -XX:MaxPermSize = 256m -Xdebug -Xnoagent -Djava.compiler = NONE -Xrunjdwp:transport = dt_socket,address = 8000,server = y,suspend = y

I start the server with jetty:run-forked 我用jetty:run-forked启动服务器

I have created a new debug configuration - Remote Java Application with below attributes, Connection type : Standard (Socket Attach) Host: Localhost Port: 8000 我创建了一个新的调试配置-具有以下属性的远程Java应用程序,连接类型:标准(套接字连接)主机:Localhost端口:8000

The server gets started and I could run the application but the debug is not working. 服务器启动,我可以运行该应用程序,但调试无法正常进行。 (I have already verified skip breakpoints it's unchecked) (我已经验证了跳过断点未选中)

I have also referred the below questions but the issue is not resolved yet. 我也提到了以下问题,但问题尚未解决。 Please help. 请帮忙。

Question1 问题1

Question2 问题2

Don't use jetty:run-forked as that will spawn a new JVM. 不要使用jetty:run-forked因为那样会产生一个新的JVM。

The process of forking a new JVM means that the maven JVM settings will not propagate. 派生新JVM的过程意味着maven JVM设置将不会传播。

It can't propagate those settings (like port), as they are now used by the maven JVM, and cannot be used by the forked JVM (eg: Bind Exception). 它无法传播那些设置(如端口),因为它们现在已被Maven JVM使用,并且无法被派生JVM使用(例如:Bind Exception)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM