Search code examples
javaspringlocalhostrmi

Java RMI - localhost and debugging


I have a few services set up in the SPring config to use RMI to invoke methods. In the test environment this resolves to the localhost, which could potentially allow me to debug the code. Unfortunately, it simply exectures the method and returns a value. Is there a way to setup intellij to debug RMI localhost requests?


Solution

  • What a problem to debug Spring RMI service? If you run it in Tomcat, just start tomcat as catalina.sh jpda run and in Idea create Remote Debug configuration, transport - socket, debugger mode - attach, host - localhost, port - usually 8000. That's all.