2

I needed to debug wso2 product integration test, In the integration test module pom file I found this line:

<argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>

I need to know the command that i need to replace it with to debug the mavan build?

Chandana
  • 2,578
  • 8
  • 38
  • 55
tk_
  • 16,415
  • 8
  • 80
  • 90

2 Answers2

3

Found the answer! There are 2 ways of doing this,

First way

Should comment the below arg line which located in the pom file. You can include this in a parent pom file where you want to debug.

<argLine>-Xmx1024m -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>

and add below lines and configure the debug configuration.

<argLine>-Xms512m -Xmx1024m -XX:MaxPermSize=128m -Xmx1024m -XX:PermSize=256m
                        -XX:MaxPermSize=512m -Xdebug -Xnoagent -Djava.compiler=NONE
                        -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
                    </argLine>

Make sure you replace the address 5005 accordingly in debug configuration.

Second way

you can use -Dmaven.surefire.debug in command line rather using pom arg line which is the easiest way.

Then the build commend will be something like this>

$ mvn clean install -Dmaven.surefire.debug

Community
  • 1
  • 1
tk_
  • 16,415
  • 8
  • 80
  • 90
-1

You should be able to debug by passing debug <port> when starting wso2 products.

./wso2server.sh debug 5005
Abimaran Kugathasan
  • 31,165
  • 11
  • 75
  • 105