Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross-continent remote Java Debugging

When attaching the debugger in an IDE (IntelliJ or Eclipse) to a JVM running in another continent (london to new york) the lag is unbearable. I've waited in excess of 10 minutes for IntelliJ to populate my stackframes and fill out objects before giving up when hitting a breakpoint. (note: ive never seen a fully populate debug state when doing this!) This makes remote debugging using an IDE impossible!

I am aware of the jdb tool, which doesn't experience any such lag issues. I imagine because it is more fine-tuned to specific data retrievals from the VM rather than populating each stack frame and all accessible values.

Is anyone aware if there is an intermediate ground? I find jdb cumbersome to use - I would love to see a UI (built atop of jdb) that did not experience the lag issues of an IDE. Does anyone know if such an application exists?

Does anyone know of other techniques to debug remote VMs executing thousands of miles away?

like image 695
ares Avatar asked Feb 17 '10 20:02

ares


People also ask

How do I debug a Java program remotely?

Go to the eclipse menu and select Run->Debug Configuration; it opens Debug Configuration setup. On the Debug configuration window, create a new “Remote Java Application” configuration. Select the project to be debugged and give it a Name. Select connection type, Socket Attach, or Socket Listen.

How do you set the JVM property of the server to debug?

Enable JVM DebuggingClick Java > JVM Settings tab. Under Debug Java Settings, select the Enable Debug checkbox. Provide JVM options as necessary by clicking the New button. If you substitute suspend=y, the JVM starts in suspended mode and stays suspended until a debugger attaches to it.


1 Answers

Buy something like an linode or other VPS that is running on said continent(or if you have any friends with spare bandwidth living on the continent).

Setup X-Forwarding, and run your IDE on the VPS connecting to it from your home with ssh.

Hopefully the graphical X lag is more bearable(hint: yes) than the debugging lag you talked about.

like image 175
Earlz Avatar answered Sep 19 '22 21:09

Earlz