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

(Dan Royer) #1

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?

(Stefan Oehme) #2

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.

(Dan Royer) #3

imported the root.

(Stefan Oehme) #4

That’s not a Gradle project.

(Dan Royer) #5

Doh. Then why did gradle import work?

(Stefan Oehme) #6

Gradle just treats it as an empty project.