# Failing to run on Intellij in debug mode

**URL:** <https://discuss.elastic.co/t/failing-to-run-on-intellij-in-debug-mode/227805>\
**Category:** Elasticsearch\
**Created:** [April 13, 2020, 4:59pm UTC](https://discuss.elastic.co/t/failing-to-run-on-intellij-in-debug-mode/227805 "2020-04-13T16:59:23Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![MarkVieira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/markvieira/32/45333_2.png) [@MarkVieira](https://discuss.elastic.co/u/MarkVieira)\
**Post date:** [April 15, 2020, 9:18pm UTC](https://discuss.elastic.co/t/failing-to-run-on-intellij-in-debug-mode/227805/3 "2020-04-15T21:18:04Z")

</div>

Your debug run configuration in IntelliJ needs two main items configured for it to work well with the `:run` task.

1. It needs to use "listen" mode instead of the default "attach".
2. "Auto restart" needs to be enabled.

The config should look something like this:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/9/09711fab942f7e0f83c65cd9f947b611ddd47d64.png)

Importing the project _should_ have set this up for you however.

---

_[View the full topic](https://discuss.elastic.co/t/failing-to-run-on-intellij-in-debug-mode/227805)._
