Hi, Ive been trying unsuccessfully to connect two client debuggers to a Debuggee program in context of JPDA. Is this possible or are there workarounds to make it happen?
I am using eclipse as the IDE (edit for typo). Think of a server program as a Hello World which Prints out: System.out.println("I have the String"); //1 System.out.println("You will have to pass through the breakpoints before you shall see"); System.out.println("breakpoints"); System.out.println("before you shall see"); //4
We can put breakpoints at lines 1 and 4.
Step 1: The Para's passed to the program in Run Configuration: -Xdebug -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y
(server=y tells vm to behave like a server, suspend=y implies that prog execution will be suspended till debugger latches on to it) and Run the program.
Step 2: Go to Debug as , Debug config ,Remote Java application and create a new instance: Project: Same as before Connection type: Socket Attach(Socket Attach) Host:LocalHost Port:8000 Now when I debug Prog execution stops at the specified breakpoint. What I cant do is create another instance of this remote debugger that can latch on to the server(prog 1), I get a connection refused when I do that. Let me know if anyone else has faced this problem and if a workaround exists. Thanks!
Thanks