# How can I debug the Elasticsource code use Eclipse or Intellij

**URL:** <https://discuss.elastic.co/t/how-can-i-debug-the-elasticsource-code-use-eclipse-or-intellij/36120>\
**Category:** Elasticsearch\
**Created:** [December 2, 2015, 4:25am UTC](https://discuss.elastic.co/t/how-can-i-debug-the-elasticsource-code-use-eclipse-or-intellij/36120 "2015-12-02T04:25:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![caominghua](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@caominghua](https://discuss.elastic.co/u/caominghua)\
**Post date:** [December 2, 2015, 4:25am UTC](https://discuss.elastic.co/t/how-can-i-debug-the-elasticsource-code-use-eclipse-or-intellij/36120/1 "2015-12-02T04:25:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)\
**Post date:** [December 2, 2015, 6:53am UTC](https://discuss.elastic.co/t/how-can-i-debug-the-elasticsource-code-use-eclipse-or-intellij/36120/2 "2015-12-02T06:53:52Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![caominghua](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@caominghua](https://discuss.elastic.co/u/caominghua)\
**Post date:** [December 2, 2015, 11:07am UTC](https://discuss.elastic.co/t/how-can-i-debug-the-elasticsource-code-use-eclipse-or-intellij/36120/3 "2015-12-02T11:07:48Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:34pm UTC](https://discuss.elastic.co/t/how-can-i-debug-the-elasticsource-code-use-eclipse-or-intellij/36120/4 "2017-07-05T23:34:10Z")

</div>


