简体   繁体   中英

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:debug as 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 Configurations then + , 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.

托梅

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配置

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

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:debug as 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 .

远程

Now I click OK , and I debug this configuration.

Breakpoints are detectable and debugging works perfect.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM