I have a core java app running on a computer on my network. Can I attach a debugger (netbeans preferred) to this from another computer on the same network?
Please advise how to do this if it is possible, or point me to an article I've had a terrible time googling for it. I don't see why it shouldn't be possible.
Thanks
Yes, you can.
Start your JVM with these arguments:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
The address number is the port number the JVM will listen on for a debugger to attach to. Set suspend to y
if you want the JVM to wait until a debugger is attached before starting main
.
Your debugger should have the option to connect to a remote JVM. It should be a simple matter of punching in the host and port number.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With