John
John

Reputation: 1601

How to turn on remote debug on app that run on a docker container?

I'm using Intellij IDEA and I run my application on docker container and I need to attach remote debug for my application. But if I use java 8 all works is fine but if I assemble my application using java 11 I couldn't attach remote debug to my app that is running in the Docker container. I get the following error message: enter image description here

that is my debug configuration: enter image description here What is I'm doing wrong?

Upvotes: 1

Views: 64

Answers (1)

John
John

Reputation: 1601

I found my mistake. I'm running my application on the docker container with a configuration for remote debug for java 8 instead of java 11. in that params need to be correct:

-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005

I forgot the * symbol in the address.

Upvotes: 1

Related Questions