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