EddyG
EddyG

Reputation: 2119

Debug tomEE on IntelliJ

I know that this answer was asked before, but I couldn't find a clear solution from the given answers.

I want to debug a maven project that implements a web service on tomEE using IntelliJ or any other IDE.

I know that instead of calling the goal tomee:run I must call tomee:debug. And that's what I did: In IntelliJ, I click on Run / Edit Configurations then +, I chosen Maven, I located the project directory and I set tomee:debugas command line. I started the debug and it says:

Started server process on port: 8080

Listening for transport dt_socket at address: 5005

I think this first step is correct. The second step as I understood is to create a remote configuration, and this is what I failed to do.

What I did is the following: Run / Edit Configurationsthen +, then TomEE Server. Here I choose local or remote? In my case I think local because the project is local on the device and I call it using localhost:8080.

tomee

After that, how to configure this page? What will be the port number 5005 or 8080? And when I finish configuring this page what I do? Run or debug?

tomee config

I would appreciate a detailed answer because I was not able to understand the short answers given on other questions.

Upvotes: 0

Views: 1181

Answers (1)

EddyG
EddyG

Reputation: 2119

Here's the solution:

Step 1: In IntelliJ, I click on Run / Edit Configurations then + to add a new configuration, I chosen Maven, I located the project directory and I set tomee:debugas command line. I started the debug and it says:

Started server process on port: 8080

Listening for transport dt_socket at address: 5005

An alternative solution can be by locating the project directory in terminal and running the command: mvn tomee:debug

Step 2: In IntelliJ, I click on Run / Edit Configurations then + to add a new configuration, I chosen Remote, and I specify localhost with port 5005.

remote

Now I click OK, and I debug this configuration.

Breakpoints are detectable and debugging works perfect.

Upvotes: 1

Related Questions