I am using intellij CE and trying to debug the gravitee.io policy locally. I am struggling from several days with no avail. I am C# developer and very novice to intellij. If someone can help me nail down the issue of my debugging, I will truly appreciate it. Here is my setup: I have cloned 1.30.x branch of gateway and management-api in following respective directories:
C:\Work\Java\gravitee.io\git\gravitee-gateway-1.30.x
C:\Work\Java\gravitee.io\git\gravitee-management-rest-api-1.30.x
I also downloaded gravitee.io 1.30.1 binaries and placed it in the following respective directories:
C:\Work\Java\gravitee.io\1.30.1\graviteeio-gateway-1.30.1
C:\Work\Java\gravitee.io\1.30.1\graviteeio-management-api-1.30.1
As per guide, I need to run the standalone container for both gateway and management-api in debug mode. So here is my debug configuration for both gateway and management-api
These both are working fine in debug mode.
Now I created a maven policy and in pom.xml, I use maven-resources-plugin to copy compiled policy into following directories:
C:\Work\Java\gravitee.io\1.30.1\graviteeio-gateway-1.30.1\plugins
C:\Work\Java\gravitee.io\1.30.1\graviteeio-management-api-1.30.1\plugins
I would like to debug this policy and hit my breakpoints. Can someone please guide me setting this up? Without debugging, development of any project is just not possible whether it be C# or Java.
It will not automatically hit my breakpoints I believe.. In .Net world, we have a concept of debug symbols.. I am sure something similar will be available in Java to find m code and hit breakpoint. I still don't understand once I deploy my plugin (zip file) to the respective plugins directory in gateway and management-api, there is no magical thing which will let it find my code and hit the breakpoint.
I am sure I am missing something on either my policy project OR gateway and management-api debug configuration that can help gateway and management-api find my code.
I also would like to mention that policy is loaded just fine in both gateway and management-api since I already see logs in gateway console coming out of my policy.
Any help is truly appreciated. As I mentioned, I am very novice to intellij and Java world but not to programming.
Thanks