When debugging your application in microservice architecture you must first think which microservice you need to debug. Most time request flow is touching many of them. It is also important to remeber that JLupin Next Server start microservices as a seperate OS processes to provide isolation. When you use remote dubugging Java feature you connect to specific JVM instance. You can also connect to many JVM same time to see for example output send by microservice and incoming input on the other side. Main server can also be run in debug mode (IMPORTANT: it will only debug configured beans, etc. which are running on main server, not microservice!).
Main server debugging
In order to start a global server in remote debugging mode it is necessary to change parameter LOG_LEVEL in setenv configuration file to
DEBUG and then restart ther Main Server.
The listening remote debugging port is defined also in
setenv config file. The default port for Main Server's remote debugging is: 12998. You may change the port by editing
setenv (do it only if it is really necessary).
To be able to perform remote debugging for a specific application, it is necessary to set listening parameters for that application in microservice YAML configuration file.
The following is an example of remote debugging settings:
[..] PROPERTIES: jvmOptions1: '-Xms128M -Xmx256M -agentlib:jdwp=transport=dt_socket,address=19101,server=y,suspend=y' jvmOptions2: '-Xms128M -Xmx256M -agentlib:jdwp=transport=dt_socket,address=19201,server=y,suspend=y' [...]