The client/server design of the Java debugger allows you to launch a Java program from computer on your network and debug it from the workstation running the platform.  This is particularly useful when you are developing a program for a device that cannot host the development platform.  It is also useful when debugging programs on dedicated machines such as web servers.  

Note:  To use remote debugging, you must be using a Java VM that supports this feature.

To debug a program remotely, you must be able to launch the program in debug mode on the remote machine so that it will wait for a connection from your debugger.  The specific technique for launching the program and connecting the debugger are VM-specific.  The basic steps are as follows:
1.Ensure that you are building your Java program with available debug information. (You can control these attributes from the Goto the Java compiler preference page Java > Compiler preference page).
2.After you build your Java program, install it to the target computer. This involves copying the .CLASS files or .JAR files to the appropriate location on the remote computer.
3.Invoke the Java program on the remote computer using the appropriate VM arguments to specify debug mode and a communication port for the debugger.
4.Start the debugger using a remote launch configuration and specify the address and port of the remote computer. When setting up the remote launch configuration there are a few items to take note of:
•You must ensure you enter the correct hostname i.e. the name of the remote computer where you are currently running your code. The hostname can also be the IP address of the remote machine, for example using 127.0.0.1 instead of localhost.
•The port number must be the number of the port on the remote machine. Certain Java VMs support another way of starting a remote debug session. In this alternative connection type, the debugger is launched first. The debugger then waits and listens for the VM to connect to it. To debug this way, you must properly configure and launch a remote debug session, then launch the VM, specifying the location of your waiting debugger. For more information, see Using the remote Java application launch configuration.

Eclipse Help

可以远程调试 a Java program  这里包含web项目application项目EJB项目

这个功能非常有用,当有一个你不能部署但是正在运行的复杂的项目

前 提

To debug a program remotely, you must be able to launch the program in debug mode on the remote machine so that it will wait for a connection from your debugger. The specific technique for launching the program and connecting the debugger are VM-specific. The basic steps are as follows:

  1. Ensure that you are building your Java program with available debug information. (You can control these attributes from the Goto the Java compiler preference page Java > Compiler preference page).
  2. After you build your Java program, install it to the target computer. This involves copying the .CLASS files or .JAR files to the appropriate location on the remote computer.
  3. Invoke the Java program on the remote computer using the appropriate VM arguments to specify debug mode and a communication port for the debugger.
  4. Start the debugger using a remote launch configuration and specify the address and port of the remote computer.

翻译:

为了远程调试一个程序,你必须能够在远程机器上以debug模式启动这个程序,以便与调试器建立连接。点击这里查看文档

  1. 确保携带着可用的调试信息构建你的java程序
  2. 构建完毕之后,将它安装到目标机器。将.CLASS 或.JAR 拷贝的远程机器的适当位置
  3. 调用这个指定了debug模式和通信端口的远程机器上的Java程序
  4. 启动这个使用了远程调试模式且指定了远程机器的地址和端口的调试器

注:

①调试信息包括:

②debug模式启动服务:

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=y

这里有一个例子

Remote Debugging an EJB on WebLogic Server 10.0.1 with JDeveloper 10.1.3.3

Remote Debugging (1)的更多相关文章

  1. 在chrome 总调试cordova出现Detached from the target. Remote debugging has been terminated with reason: Connection lost. Please re-attach to the new target

    在chrome 总调试cordova出现如下错误: "Detached from the target. Remote debugging has been terminated with ...

  2. 转:Remote debugging with Visual Studio 2010

    Original URL http://www.codeproject.com/Articles/146838/Remote-debugging-with-Visual-Studio-2010 you ...

  3. JPDA and Set up Tomcat for Remote Debugging

    * About JPDA (http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/architecture.html) JPDA: (J ...

  4. 安卓手机移动端Web开发调试之Chrome远程调试(Remote Debugging)

    一.让安卓打debug模式的apk包 二.将电脑中的chrome升级到最新版本,在chrome浏览器地址栏中输入chrome://inspect/#devices: 在智能手机还未普及时,移动设备的调 ...

  5. Android WebView remote debugging

    /***************************************************************************** * Android WebView rem ...

  6. Android/iOS Remote debugging

    简单介绍 使用下面方法可以定位webview中的元素,无法定位view中的元素. 原文地址:http://mp.weixin.qq.com/s/y_UfdgjT_pkKgYivJmqt7Q webvi ...

  7. Remote Debugging Android Devices

    Remote Debugging Android Devices //在电脑上远程调试安卓设备 By Kayce Basques Technical Writer at Google By Meggi ...

  8. 通过Chrome浏览器进行android调试/Remote Debugging on Android with Chrome

    The way your web content behaves on mobile can be dramatically different from the desktop experience ...

  9. PyCharm 2017: Remote debugging using remote interpreter doesn't work

    I set up a remote interpreter and verified that I can run a script using the remote interpreter. Con ...

随机推荐

  1. elasticsearch命令

    如果安装了x-pack插件,需要验证 curl -u username:passwd 1.查看所有index curl -XGET localhost:/_cat/indices?v 2.清理所有in ...

  2. 通过docker-compose构建ghost博客(一)

    通过命令构建ghost博客 docker run -d --name ghost -p : -v $PWD/data:/var/lib/ghost ghost 当然也可以编写yml文件,通过docke ...

  3. c#tcp源端口号和目的端口怎么理解

    在一台机器上,一个进程对应一个端口.端口的作用就是用来唯一标识这个进程.源端口标识发起通信的那个进程,目的端口标识接受通信的那个进程.有了端口号,接受到报文后才能够知道将报文发送到哪个进程.

  4. oracle 异常错误处理

    分类: Oracle 5.1 异常处理概念 5.1.1 预定义的异常处理 5.1.2 非预定义的异常处理 5.1.3 用户自定义的异常处理 5.1.4 用户定义的异常处理 5.2 异常错误传播 5.2 ...

  5. OKI系列针式打印机更换色带图解教程

    色带一直换不好,今天找到一个带图的教程,收藏一下 打开新色带的包装后,我们可以仔细观察一下新色带,找到里面带有一段“扭曲”色带的位置,这段色带就是:“莫比乌斯带”结构. 找到“莫比乌斯带”结构(就是有 ...

  6. js call方法的使用

    转自:js call call 方法 请参阅 应用于:Function 对象 要求 版本 5.5 调用一个对象的一个方法,以另一个对象替换当前对象. call([thisObj[,arg1[, arg ...

  7. 转easyui datagrid 前台分页的实现

    easyui datagrid 前台分页的实现java采用的版本 来源:本站原创 js知识 超过5,090人围观 暂无评论 使用easyui分页,有后台服务器端实现和前台浏览器端实现.服务器端实现按规 ...

  8. Using The jQuery Migrate Plugin

    jQuery( html [, ownerDocument ] )Returns: jQuery Description: Creates DOM elements on the fly from t ...

  9. Spring IOC(八)bean 的创建

    Spring IOC(八)bean 的创建 Spring 系列目录(https://www.cnblogs.com/binarylei/p/10198698.html) 参考: 每天用心记录一点点.内 ...

  10. [Spark]Spark章1 Spark架构浅析

    Spark架构 Spark架构采用了分布式计算中的Master-Slave模型.集群中运行Master进程的节点称为Master,同样,集群中含有Worker进程的节点为Slave.Master负责控 ...