diff --git a/TESTING.asciidoc b/TESTING.asciidoc index aa5431ed69b..a1a01a8f231 100644 --- a/TESTING.asciidoc +++ b/TESTING.asciidoc @@ -25,12 +25,6 @@ run it using Gradle: gradle run ------------------------------------- -or to attach a remote debugger, run it as: - -------------------------------------- -gradle run --debug-jvm -------------------------------------- - === Test case filtering. - `tests.class` is a class-filtering shell-like glob pattern, @@ -480,7 +474,7 @@ Combined (Unit+Integration) coverage: mvn -Dtests.coverage verify jacoco:report --------------------------------------------------------------------------- -== Debugging from an IDE +== Launching and debugging from an IDE If you want to run elasticsearch from your IDE, the `gradle run` task supports a remote debugging option: @@ -489,6 +483,17 @@ supports a remote debugging option: gradle run --debug-jvm --------------------------------------------------------------------------- +== Debugging remotely from an IDE + +If you want to run Elasticsearch and be able to remotely attach the process +for debugging purposes from your IDE, can start Elasticsearch using `ES_JAVA_OPTS`: + +--------------------------------------------------------------------------- +ES_JAVA_OPTS="-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=y" ./bin/elasticsearch +--------------------------------------------------------------------------- + +Read your IDE documentation for how to attach a debugger to a JVM process. + == Building with extra plugins Additional plugins may be built alongside elasticsearch, where their dependency on elasticsearch will be substituted with the local elasticsearch