How can I enable java debug on an elastic beanstalk application running a java application?

Viewed 1759

When running an elastic beanstalk java application (not tomcat), how can I enable remote debugging?

AWS documentation shows how it could be achieved for the app, by specifying the command that starts the java process.

But if I want to deploy the SAME app separately (for instance a dev and a prod deployment), and only want to enable remote debugging for dev, how can this be achieved?

2 Answers

I think you can use aws tool plugins for Eclipse https://aws.amazon.com/eclipse/

enter image description here

Tick the box and save will allow user to remote debug.

Or change in AWS console > Elastic Beanstalk > Config > JVM options

enter image description here

Above is for JDK before JDK5

For JDK8: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8787

Related