Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debugging a Wildfly Application on Docker through Eclipse?

I've deployed a Wildfly application server using Docker as described here http://tools.jboss.org/blog/2015-03-02-getting-started-with-docker-and-wildfly.html, and I'm using it for development work in Eclipse. Everything is working fine. I'm able to deploy to a local directory and have it mapped to the Wildfly deployment directory with no problem. The only thing I don't have working is debugging. I'm unable to set breakpoints within Eclipse and debug the deployed application. How do I go about doing this? I wasn't able to find any documentation explaining how I could accomplish this in Eclipse and Docker.

like image 284
Shadowman Avatar asked Sep 06 '17 18:09

Shadowman


People also ask

How do I debug a Docker container in Eclipse?

Open the Debug Configuration settings page in Eclipse and create a Remote Java Application configuration. Click Debug and you are all set to specify a breakpoint and start debugging. Happy debugging.

How do I integrate WildFly with Eclipse?

Go to Help > Install New Software. Set Work with to the following URL depending on Eclipse version: 4.8+ (Photon): https://download.jboss.org/jbosstools/photon/stable/updates/ 4.7 (Oxygen): http://download.jboss.org/jbosstools/oxygen/stable/updates/


1 Answers

You need to do remote debugging against the running container, but before that, you will need to run container in debug mode and map debug port 8787

docker run -it -p 8080:8080 -p 8787:8787 jboss/wildfly \ 
   /opt/jboss/wildfly/bin/standalone.sh -b 0.0.0.0 --debug
like image 54
Camilo Silva Avatar answered Oct 01 '22 23:10

Camilo Silva