在Eclipse中使用Maven jetty的debug模式

1.右鍵項目debug as添加mvn命令: jetty:runjava

2.進入eclipse的菜單Run->Debug configurations,會看到maven build下對應的項目的mvn命令的項,選中Environment選項卡 -->New,name輸入MAVEN_OPTS,value中加入-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=4000,server=y,suspend=yeclipse

3.項目右鍵Debug as-->Maven build(剛纔設置的mvn命令)socket

 

 

maven下 jetty:run很爽,可是偶爾想經過eclipse調式一下能夠嗎?maven

回答是確定的ui

Goals仍是設置爲jetty:runspa

Environment添加variabledebug

name:MAVEN_OPTS調試

variable:-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=nserver

 

而後eclipse debug,跟之前同樣調試有木有ip

相關文章
相關標籤/搜索