Hey guys, I’m trying to extend some Entando functionalities and I need some debug to figure out what is happening, how can I proceed?
I’m using IntelliJ Idea
Hey guys, I’m trying to extend some Entando functionalities and I need some debug to figure out what is happening, how can I proceed?
I’m using IntelliJ Idea
Getting inspiration from this https://servicesblog.redhat.com/2019/03/06/remote-debugging-of-java-applications-on-openshift/
I’ve solved as follows:
Open your deployment definition file, search for the containers env var list and add this:
Restart your deployment (maybe you need to scale down before)
Open a terminal and run oc port-forward [POD_NAME] 8000
setting your desired pod name
Set and run a remote debug configuration like in the attached screenshot
Let’s debug!
Thanks! This worked perfectly for me.
One comment, my settings were slightly different to get this working in my non-OpenShift local quickstart environment.
-XX:+UseParallelGC -Xms40m -Xmx256m -XX:+AggressiveOpts -XX:MinHeapFreeRatio=20 -XX:MaxHeapFreeRatio=40 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dorg.apache.tomcat.util.LOW_MEMORY=true...
kubectl port-forward --address 0.0.0.0 deploy/quickstart-server-deployment 5005:5005