Java debug using socket vs shared memory

痞子三分冷 提交于 2019-12-23 13:22:11

问题


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

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.


回答1:


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.




回答2:


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.


来源:https://stackoverflow.com/questions/8402338/java-debug-using-socket-vs-shared-memory

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!