Sunday, December 17, 2017

Debugging an AppEngine app locally using IntelliJ Community Edition

This post puts together information that is spread across different GCP documents.

First, configure appengine.run.jvmFlags in build.gradle as described here:

appengine {
    run {
        jvmFlags = [
            '-Xdebug',
            '-Xrunjdwp:transport=dt_socket,' + 
                'server=y,suspend=y,address=5005'
        ]
    }
}

Second, configure remote debug configuration as shown here.

In order to debug the app, start the local server from the Gradle or Maven toolbox in the margin of your IDE, or run

gradle appengineRun or gradle appengineStart

from the command line.

Then choose the remote debug configuration on the top toolbar and click Debug icon.

No comments:

Post a Comment