Skip to content

Commit

Permalink
Add documentation on remote debugging
Browse files Browse the repository at this point in the history
For a node which is launched outside the context of Gradle.
  • Loading branch information
dadoonet committed Jan 13, 2017
1 parent 370ea01 commit 812f6e3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion TESTING.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -474,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:
Expand All @@ -483,6 +483,23 @@ 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, you need to add the following line in
`config/jvm.options`:

---------------------------------------------------------------------------
-Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=4000,suspend=n
---------------------------------------------------------------------------

Then start elasticsearch with `bin/elasticsearch` as usual.

If you are using IntelliJ, create a new Run/Debug configuration, choose `Remote`
and define the same port you defined in `config/jvm.options`. Then start the
remote debug session from IntelliJ.


== Building with extra plugins
Additional plugins may be built alongside elasticsearch, where their
dependency on elasticsearch will be substituted with the local elasticsearch
Expand Down

0 comments on commit 812f6e3

Please sign in to comment.