2016-09-22 14 views
2

Windows OS、JDK 1.7、Gradle 3.0、IDE Eclipse mars、jetty 8.1.5.v20120716を使用しています。デバッグでうまくいきません。

注:私はあまりにも

gretty { 
    port = http_port 
    host = '127.0.0.1' 
    contextPath = '' 
    classPath = sourceSets.main.resources.srcDirs 
    servletContainer = 'jetty9' //tomcat7 or tomcat8 
    httpPort = 8081 
    servicePort = 8082 
    statusPort = 8083 
} 

行動はそれだけでポート5005のステートメントであっぶら下がっている、私が試したすべてのオプションで同じである、それもアプリケーションをロードしていないgrettyプラグインを使用していますまた、私はSpringのアノテーションベースとクラス型の初期化子「AbstractAnnotationConfigDispatcherServletInitializer」を使用しています

私は以下のオプションを試しました。 appStartDebug、appRunDebug、jettyStartDebug、jettyRunDebugがあります。

C:\project>echo %GRADLE_OPTS% 
-Xdebug -Xrunjdwp:transport=dt_socket,address=9999,server=y,suspend=n 

C:\project>gradle jettyStartDebug 
Listening for transport dt_socket at address: 9999 
Starting a Gradle Daemon, 10 busy and 19 stopped Daemons could not be reused, use --status for details 
'5e5ca94' 
:prepareInplaceWebAppFolder UP-TO-DATE 
:createInplaceWebAppFolder UP-TO-DATE 
:compileJava UP-TO-DATE 
:processResources UP-TO-DATE 
:classes UP-TO-DATE 
:prepareInplaceWebAppClasses UP-TO-DATE 
:prepareInplaceWebApp UP-TO-DATE 
:jettyStartDebug 
Listening for transport dt_socket at address: 5005 

この問題についてお手伝いをしてください。

答えて

2

を参照してください。

eclipseで:実行>デバッグ設定>リモートJavaアプリケーション 次に、右クリックして新規作成します。まだ起動しないでください。

Remote Debug

その後コンソールを行くとして、あなたのプロジェクトを開始:GradleのjettyRunDebug、それは「アドレスに輸送dt_socketというのリスニング:5005」に停止したとき、あなたのデバッグは以前に作成した構成で、IDEので、そこに起動します。

デバッグモードにする必要があります。

+1

ありがとう、今はうまくいきます。あなたは本当に私の一日を作った。 –

0

%GRADLE_OPTS%からデバッグオプションを削除し、

gretty { 
    debug = true 
    debugSuspend = false 
    debugPort = 9999 
    ... 
} 

を行うには、あなたは、リモートデバッグセッションを作成する必要がありますStartBaseTask.groovyAppStartTask.groovy

関連する問題