How can I debug the Elasticsource code use Eclipse or Intellij


(minghua.cao) #1

I just want to debug the ElasticSearch source code in Eclipse, how can i do this. thanks


(Magnus B├Ąck) #2

Could you be more specific? Where are you stuck? Have you imported the POM file as a new project in Eclipse?


(minghua.cao) #3

What i did is this:
---- First ---

  1. I git pull the elasticsearch 2.1 to local computer.
  2. run "maven eclipse:eclipse" in the source code root deirectory.
  3. open eclipse and import it by "General" -> "Exsiting Projects into Workspace"
  4. I run the main function of "Elasticsearch" class of the Bootstrap package. then the Console told me "path.home" not be configged. So I cannot debug it by runing the main function.
    ---- Second ---
    Then I new a run confgiuration with maven goal parameter "package -DskipTests -Drun -Pdev", and run it . I can run it normally. but when i run it with debug mode, it cannot hit my breakpoint.
    --- Third ---
    Then I cd to my Elasticsearch source code root derectory, and run mvnDebug package -Dsikptest -Drun -Pdev in the console , and configure remote debug mode in Eclipse. however it cound'nt hit my breakpoint too, even my brenkpoint was on the main function line.

--- Now ---
I run the 1.7 by right click ElasticsearchF class and debug run.
However, i can't debug the Elasticsearch 2.1 until now.


(system) #4