Remote debugging when WSO2 product run as a windows service
1 min readJun 2, 2020
- WSO2 Carbon and any Carbon-based product can be run as a Windows service. But sometimes we need to debug remotely to identify the issues. To that, you can follow the steps below.
- Navigate to the <YAJSW_HOME>/bat directory.
- Stop the service running the stopService.bat file.
- Open the wrapper.conf file which is in <YAJSW_HOME>/conf/ directory.
- Add the following lines to the end of the wrapper.conf file and save it.
wrapper.java.additional.30 = -Xdebug
wrapper.java.additional.31 = -Xnoagent
wrapper.java.additional.32 = -Djava.compiler=NONE
wrapper.java.additional.33 = -Xrunjdwp:transport=”dt_socket\,server=y\,suspend=y\,address=5005"
- 5005 is the port that is using when debugging.
5. Then go to the <YAJSW_HOME>/bat directory.
6. Uninstall the service running uninstallService.bat file.
7. Then install the service again running the installService.bat file.
8. And run the startService.bat file to start the server.
- Then you can give the Ip address and the port in the debug configuration of your IDE and start the debugging.