开发者

Cross-continent remote Java Debugging

开发者 https://www.devze.com 2022-12-20 06:42 出处:网络
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 popul

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 anyon开发者_运维技巧e know if such an application exists?

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


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.


It's probably got more to do with the bandwidth of your connection than anything to do with the debugger.


I was using the IDE IntelliJ 7.0.5 and the debugging was awful. I have since upgraded to IntelliJ 9 and the lag seems to be bearable.

I guess IntelliJ 7.0.5 was doing something 'interesting' when talking to the remote VM.


Your problem isn't insolvable: I do the reverse (New York to London) using Eclipse. It isn't sprightly, but it's nowhere near unbearable, and nothing like what you describe.

I'd ask three questions:
1) Are you absolutely tied to IntelliJ?
2) Do you have copies of the dependent jars locally?
3) How's your bandwidth overall? How does a remote desktop perform? How about editing a file over a network share?


From very light testing of a pretty large project (almost 100 subprojects, ping times ~200-300ms), Netbeans seems to be doing ok in comparison with Eclipse.

You can step and it takes few seconds to update and attaches in < 1 min.

It's of course annoying to not be able to use Eclipse, but it is a GUI and as such way better than plain JDB.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号