How to debug the AppEngine local server from IDEA+Gradle?

后端 未结 2 831
小鲜肉
小鲜肉 2021-02-15 18:46

I\'m following the Udacity App Engine course but as the tinker, I\'m following using Gradle and IDEA (Open Source edition).

I have setup the project successfully using t

2条回答
  •  -上瘾入骨i
    2021-02-15 19:12

    First you have to set the JVM debug parameters in your build.gradle file so that you are able to debug the local development server remotely.

    appengine {
        ...
        jvmFlags = ['-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000']
    }
    

    Then you need to create a run/debug configuration in IntelliJ IDEA (based on the above parameters) to be used for remote running or debugging processes. Remote running/debugging enables you to connect to a running JVM.

    You can find more details here. But basically go to the Run / Edit Configurations..., in the dialog box click on Add New Configuration (+) and select Remote. Make sure that the configuration matches JVM flags (especially port). Save and close the dialog box.

    Start your local development server and connect debugger (Run / Debug).

提交回复
热议问题