Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java debug using socket vs shared memory

In Java development on Windows there are two different transports that can be used while debugging.

debug window

What are the advantages of using Socket transport on the same computer where the app is running?

I know Socket can work on a remote computer. But I am trying to figure out if it makes a difference on my local dev box vs Shared memory?

Thank you.

UPDATE: I am using Intellij IDEA.

like image 689
Alexandru Luchian Avatar asked Dec 06 '11 15:12

Alexandru Luchian


2 Answers

Shared memory will be faster :-)

The only advantage of sockets on same machine I can think of is that you have the same, universal debugging protocol, so when you deploy your app to a remote server the only visible change will be the ip.

like image 77
emesx Avatar answered Oct 15 '22 06:10

emesx


What are the advantages of using Socket transport (...)?

The advantage of using Socket transport on the same machine is to ignore incompatibilities between the IDE JDK and the application's (or web-application) JDK.

Example:

Connect to a application that run on JDK32-bit will fail if the IDE is running a JDK64-bit using shared memory. In this case:

  • You MUST use Socket on the same machine.
like image 34
Grim Avatar answered Oct 15 '22 05:10

Grim