How do I debug a gradle-based project in Eclipse?

I have imported a gradle project built by someone else into Eclipse Mars with Java 1.8.

I can run all the gradle tasks (components, dependencies, dependencyInsight,help,init,model,projects,properties,tasks,wrapper).

I can’t seem to figure out how to debug my application. I tried to choose Debug As > Debug Configurations (the only option) > Java Application > Project > Browse. At this point my newly imported project is not offered as a selection.

Please: what am I missing?

From what you describe either the Gradle build is just set up incorrectly or you did not import the root project.

If you could point us to the code we could probably quickly tell you what’s wrong.

imported the root.

That’s not a Gradle project.

Doh. Then why did gradle import work?

Gradle just treats it as an empty project.