# How to debug my plugin in Eclipse

**URL:** <https://discuss.elastic.co/t/how-to-debug-my-plugin-in-eclipse/162835>\
**Category:** Elasticsearch\
**Created:** [January 3, 2019, 3:46pm UTC](https://discuss.elastic.co/t/how-to-debug-my-plugin-in-eclipse/162835 "2019-01-03T15:46:31Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![saikettewary](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@saikettewary](https://discuss.elastic.co/u/saikettewary)\
**Post date:** [January 3, 2019, 3:46pm UTC](https://discuss.elastic.co/t/how-to-debug-my-plugin-in-eclipse/162835/1 "2019-01-03T15:46:31Z")

</div>

Hi,  
I am very new to ElasticSearch and trying to debug my plugin using Eclipse. I saw a different post [How to debug elasticsearch plugin using eclipse](https://discuss.elastic.co/t/how-to-debug-elasticsearch-plugin-using-eclipse/11551) , but some links don't work and also i am in newer version of elasticsearch - 5.6

I can build my plugin and can deploy and install it on a running cluster and works just fine but i want to debug my plugin code in Eclipse IDE.

Steps that i did :

- I have created an Eclipse project for my plugin with my plugins home directory as the project path. The elasticSearch jar is in the build path so using gradle i can build my plugin just fine.
- Created a debug configuration with org.elasticsearch.bootstrap.Elasticsearch as the main class and -Des.foreground=true as VM parameter.

after running it i get below error : "ERROR: no log4j2.properties found; tried [C:\Users\U6074093\Workspaces\tr-logging\config] and its subdirectories"

Will appreciate your response .

Thanks

---

<div class="post-metadata">

**Author:** ![saikettewary](https://avatars.discourse-cdn.com/v4/letter/s/7ea924/32.png) [@saikettewary](https://discuss.elastic.co/u/saikettewary)\
**Post date:** [January 3, 2019, 8:28pm UTC](https://discuss.elastic.co/t/how-to-debug-my-plugin-in-eclipse/162835/2 "2019-01-03T20:28:45Z")

</div>

I tried to redo it .. followed [https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md#contributing-to-the-elasticsearch-codebase](https://github.com/elastic/elasticsearch/blob/master/CONTRIBUTING.md#contributing-to-the-elasticsearch-codebase)

in wondows i did below  
gradlew eclipse`then`File: Import: Existing Projects into Workspace`. Select the option`Search for nested projects` .

Changed to make sure Eclipse is using 2048m of heap by modifying `eclipse.ini`

Ran debug configuration with org.elasticsearch.bootstrap.Elasticsearch and i was getting  
Exception in thread "main" java.lang.IllegalStateException: path.home is not configured at org.elasticsearch.env.Environment.(Environment.java:101) at

Set VM Parameter -Des.path.home={workspacedir}/bin

but getting config dir not found.. if i change it to {workspacedir}\distribution\src\main\resources it complains the plugins dir not found....

what i am missing here ? Im in ES 5.6

---

<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:** [January 31, 2019, 8:39pm UTC](https://discuss.elastic.co/t/how-to-debug-my-plugin-in-eclipse/162835/3 "2019-01-31T20:39:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
