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.
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.
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/
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With