How can I setup and run/debug ElasticSearch in IntelliJ IDEA

how to debug elasticsearch
how to debug code intellij
intellij debug symbols
intellij debug multiple processes
at least java 11 is required to build elasticsearch gradle tools
intellij debug step back
elasticsearch build from source
intellij live debug

I am trying to learn how ES works however I haven't been able to run it from an IDE. I want to run the 2.3.3 build which still uses Maven as its build system but keep getting errors. Can someone tell me how I can do this in IDEA after I download the repository in detail ie. the configuration etc.

I downloaded the repository from github, then I imported the project into intellij and used the following configurations:

Main class: org.elasticsearch.bootstrap.Elasticsearch

Vm options:

-Xms256m
-Xmx1g
-Xss256k
-Djava.awt.headless=true
-XX:+UseParNewGC
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath=logs/heapdump.hprof
-Delasticsearch
-Des.foreground=yes
-Djava.library.path=lib/sigar
-ea
-Des.config=C:\elasticsearch-2.3.3\core\src\test\resources\config\elasticsearch.yaml>/elasticsearch.yml
-Des.logger.level=DEBUG
-Des.path.home=C:\elasticsearch-2.3.3

working directory: ES directory

environment variable: ES_TEST_LOCAL=true

use classpath of module: elasticsearch(1)(org.elasticsearch)

and then I get the following errors when i try to run:

error


Pre-requisites:

  1. Build the root project : mvn clean package -DskipTests (or execute run.sh)
  2. copy ./distribution/src/main/resources/config to ./core/.

Create a Run/Debug configuration as follows:

Main Class: org.elasticsearch.bootstrap.Elasticsearch   
VM Options: -Des.path.home=/code/elasticsearch/core   
Program Arguments: start   
Classpath of Module : [select the core project]   

Setup, Run & Debug Elasticsearch Source Code in IntelliJ IDEA , Review the text files included with the distribution. Note that if you are unfamiliar with using IntelliJ IDEA for debugging, help can be found in the IntelliJ IDEA Documentation. Conclusion In this blog post, I have demonstrated how to setup a project in IntelliJ IDEA that will allow interactive debugging of Elasticsearch and Lucene source code.


For 5.x - From command line:

> gradle run --debug-jvm
Running elasticsearch in debug mode, suspending until connected on port 8000
[elasticsearch] Listening for transport dt_socket at address: 8000

From Intellij, create a Remote debug configuration and set the port to 8000.

How can I setup and run/debug ElasticSearch in IntelliJ IDEA, Pre-requisites: Build the root project : mvn clean package -DskipTests (or execute run.sh); copy ./distribution/src/main/resources/config to ./core/  Hello every one, I want debug the elasticsearch source code.But I meet the below error, please give me some help, thanks. The idea vm config:-Des.foreground=yes


After downloading Elasticsearch from github, in the top level directory there is file called CONTRIBUTING.md which describes how to configure your IDE, and there is also a file called TESTING.asciidoc which describes how to debug.

Based on the instructions contained in those text files, I have written a blog post that gives step-by-step instructions on how to configure IntelliJ IDEA to debug Elasticsearch and Lucene.

https://alexmarquardt.com/2019/02/02/debugging-elasticsearch-and-lucene-with-intellij-idea/

Disclaimer: I am a consulting engineer at Elasticsearch

Debugging Elasticsearch and Lucene with IntelliJ IDEA, Debugging Elasticsearch and Lucene with IntelliJ IDEA In this blog post, I discuss how to setup an IntelliJ IDEA project that will allow The above command may take a few minutes to execute, and once it is complete, your  run Elasticsearch from the location that you exploded the tarball to with ES_JAVA_OPTS=-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 bin/elasticsearch) attach IntelliJ to the running instance: Run -> Edit Configurations -> Click + -> Select Remote -> ensure that the port is set to 5005, name the configuration "localhost:5005" -> Click Apply; in the upper right-hand corner (assuming a default layout) is a dropdown from which you need to select the configuration "localhost


Debugging Elasticsearch and Lucene with IntelliJ IDEA, In this blog post, I discuss how to setup an IntelliJ IDEA project that will allow interactive Checkout the branch for the Elasticsearch release that you want to debug. The above command may take a few minutes to execute, and once it is   Setup, Run & Debug Elasticsearch Source Code in IntelliJ IDEA. Learn how to setup an IntelliJ IDEA project that will allow interactive debugging of Elasticsearch and Lucene source code.


Remotly Debug ElasticSearch in IntelliJ · GitHub, Step 3: In IntilliJ, run the remote debug configuration you created in step 1. At this point Hi, needed to debug an elasticsearch plugin via IntelliJIDEA. (JDK 1.8  Create a run/debug configuration from a template From the main menu, select Run | Edit Configurations. Alternatively press Shift+Alt+F10 then 0. In the Run/Debug Configuration dialog, click on the toolbar or press Alt+Insert.


[Elasticsearch] Setup elasticsearch in IntelliJ idea, Then use IntelliJ idea to debug this instance remotely. Set up idea, click Run-> Edit configurations. Setup a Remote debugging. Click OK, then we  I am building an Elasticsearch plugin based on this example. The plugin uses Gradle for building, testing, integration testing, etc. I want to use IntelliJ to set a breakpoint in an Elasticsearch