Remote Debugging (1)
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:
- 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).
- 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.
- Invoke the Java program on the remote computer using the appropriate VM arguments to specify debug mode and a communication port for the debugger.
- Start the debugger using a remote launch configuration and specify the address and port of the remote computer.
翻译:
为了远程调试一个程序,你必须能够在远程机器上以debug模式启动这个程序,以便与调试器建立连接。点击这里查看文档
- 确保携带着可用的调试信息构建你的java程序
- 构建完毕之后,将它安装到目标机器。将.CLASS 或.JAR 拷贝的远程机器的适当位置
- 调用这个指定了debug模式和通信端口的远程机器上的Java程序
- 启动这个使用了远程调试模式且指定了远程机器的地址和端口的调试器
注:
①调试信息包括:
②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)的更多相关文章
- 在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 ...
- 转:Remote debugging with Visual Studio 2010
Original URL http://www.codeproject.com/Articles/146838/Remote-debugging-with-Visual-Studio-2010 you ...
- JPDA and Set up Tomcat for Remote Debugging
* About JPDA (http://docs.oracle.com/javase/7/docs/technotes/guides/jpda/architecture.html) JPDA: (J ...
- 安卓手机移动端Web开发调试之Chrome远程调试(Remote Debugging)
一.让安卓打debug模式的apk包 二.将电脑中的chrome升级到最新版本,在chrome浏览器地址栏中输入chrome://inspect/#devices: 在智能手机还未普及时,移动设备的调 ...
- Android WebView remote debugging
/***************************************************************************** * Android WebView rem ...
- Android/iOS Remote debugging
简单介绍 使用下面方法可以定位webview中的元素,无法定位view中的元素. 原文地址:http://mp.weixin.qq.com/s/y_UfdgjT_pkKgYivJmqt7Q webvi ...
- Remote Debugging Android Devices
Remote Debugging Android Devices //在电脑上远程调试安卓设备 By Kayce Basques Technical Writer at Google By Meggi ...
- 通过Chrome浏览器进行android调试/Remote Debugging on Android with Chrome
The way your web content behaves on mobile can be dramatically different from the desktop experience ...
- 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 ...
随机推荐
- Class 'com.mchange.v2.c3p0.ComboPooledDataSource' not found [config set
解决方法: 修改maven <dependency> <groupId>c3p0</groupId> <artifactId>c3p0</arti ...
- Windows下PythonQt编译(vs2015+Qt5.11.2+PythonQt 3.2)
后记: 由于自己low,没有下载罪行的python3.2导致编译上遇到种种问题,后文可以参考,建议看: <Windows7 VS2015 下编译 PythonQt3.2> https:// ...
- 8Q - 献给杭电五十周年校庆的礼物
我不能参赛,就送给学校一个DOOM III球形大蛋糕吧.等一等,吃蛋糕之前先考大家一个问题:如果校长大人在蛋糕上切了N刀(校长刀法极好,每一刀都是一个绝对的平面),最多可以把这个球形蛋糕切成几块呢? ...
- ES6 Reflect的认识
首先我们要了解一下,为什么会新添加这么一个全局对象?如果你看过Reflect的一些函数,你就会发现,这个对象上的方法基本上都可以从Object上面找到,找不到的那些,也是可以通过对对象命令式的操作去实 ...
- (轉)JSON.stringify 语法实例讲解
作用:这个函数的作用主要是为了系列化对象的. 可能有些人对系列化这个词过敏,我的理解很简单.就是说把原来是对象的类型转换成字符串类型(或者更确切的说是json类型的).就这么简单.打个比方说,你有一个 ...
- PAT 1024 科学计数法 (20)(精简版代码+思路+推荐测试样例)
1024 科学计数法 (20)(20 分) 科学计数法是科学家用来表示很大或很小的数字的一种方便的方法,其满足正则表达式[+-][1-9]"."[0-9]+E[+-][0-9]+, ...
- QT学习之路(1):彩票绝对不中模拟器
//============================================//绝对不中,彩票开奖模拟器#include "mainwindow.h"#includ ...
- c++11 stl 学习之 shared_ptr
shared_ptr智能指针 shared_ptr 的声明初始化方式由于指针指针使用explicit参数 必须显示声明初始化shared_ptr<string> pNico = new s ...
- 一台老服务器的升级日志(PHP4.4.9+MySQL5.1)升级MySQL5.6
1.备份数据库 mysqldump -uroot -p --all-databases > databases.sql 2.停止mysql服务 service mysqld stop 3.卸载旧 ...
- 【C#】解析C#程序集的加载和反射
目录结构: contents structure [+] 程序集 程序集的加载 发现程序集中的类型 反射对类型成员的常规操作 发现类型的成员 创建类型的实例 绑定句柄减少进程的内存消耗 解析自定义特性 ...