use Eclipse| a Java application

创建一个简单的maven项目

Main.java

package cn.zno;

public class Main {

    public static void main(String[] args) {
for (String arg : args) {
System.out.println(arg);
}
} }

Main.java

pom.xml

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>cn.zno</groupId>
<artifactId>za</artifactId>
<version>1.0</version> <build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>

pom.xml

Building jar

右键项目

[INFO] Building jar: F:\e\workspacetest\za\target\za-1.0.jar

以调试模式远程启动

F:\>java -cp F:\e\workspacetest\za\target\za-1.0.jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend
=y cn.zno.Main a b c
Listening for transport dt_socket at address: 8000
_

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

现在处于挂起状态,等待debugger 启动

启动debugger

配置需要调试的项目,Host 和 Port

其中Host 是远程电脑的ip ,Port 为远程电脑debug模式指定的端口

然后在progress中打好断点,启动Debug,便可进入到断点调试中(如下图)

可以调试了~

最终结果:

F:\>java -cp F:\e\workspacetest\za\target\za-1.0.jar -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=8000,suspend
=y cn.zno.Main a b c
Listening for transport dt_socket at address: 8000
a
b
c

编译时的debug信息

如果不勾选line number 调试过程中会出现这种错误:

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

  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. Remote Debugging (1)

    The client/server design of the Java debugger allows you to launch a Java program from computer on y ...

  4. JPDA and Set up Tomcat for Remote Debugging

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

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

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

  6. Android WebView remote debugging

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

  7. Android/iOS Remote debugging

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

  8. Remote Debugging Android Devices

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

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

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

  10. 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. <history> 特别报道:Google离职富翁们都在干什么?

    特别报道:Google离职富翁们都在干什么? 时间:2008-01-23 10:16:47作者:CNET科技资讯网 本文关键词:Google CNET科技资讯网1月23日国际报道 假如你拥有1千万或1 ...

  2. linq 动态判断

    以前要不是使用扩展方法 要么使用如(t==2&&判断条件)||(s==1&&判断条件) 其实可以简单的实现扩展一个whereIf即可(abp实现),如下所示 ··· / ...

  3. c#networkcomms protobuf-net 文件加载出现问题

    服务器端里添加客户管理添加了些功能, 客户端私活连不上了,老程序没问题, 在服务器端程序里边也接受不到事件,客户端就提示链接中断了, 在客户端里边查了 链接中断是客户端上做的,当传回的包为0 事,程序 ...

  4. PAT 甲级 1008 Elevator (20)(代码)

    1008 Elevator (20)(20 分) The highest building in our city has only one elevator. A request list is m ...

  5. vs2010打开qt的.pro文件时错误解决办法

    注意:qt creator工程中一般都已经存在*.pro文件,里面存放着一些自己配置的包含头文件和lib库文的信息,最好不要再重新使用qmake -project生成,若重新生成,则可能要重新增加配置 ...

  6. Python3实战系列之一(获取印度售后数据项目)

    问题:公司在印度开设生产工厂并在当地销售手机,生产.销售系统均由印度开发维护.对总部需要的售后数据,采用每日在ftp上提供一个.xlsx文件,给总部使用.总部需要将此数据导入到总部的销量统计系统中,以 ...

  7. 安装配置nfs

    #yum -y install nfs-utils rpcbind #service rpcbind start#service nfs start #chkconfig --add rpcbind# ...

  8. object SparkStreaming_StateFul {

    窗口查询 ) )).reduceByKeyAndWindow(_+_,_-_,Seconds(10),Seconds(15))     每隔15s进行查询,查询为前10s的结果.这里的值必须为采集时间 ...

  9. SharePoint 开发小结

    目标:将sharepoint网站对接Office 365 最直接的API:How to: Add Office 365 APIs to a Visual Studio project http://m ...

  10. spring学习 十七 scope属性,单例多例

    Scope属性是<bean>中的属性,取值可以有, singleton 默认值, 单例, prototype 多例, 每次获取重新实例化, request 每次请求重新实例化, sessi ...