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. how2j网站前端项目——天猫前端(第一次)学习笔记1

    首先是公共页面的学习,有页头.页脚和搜索框. 一.页头就是天猫网站的置顶导航栏: 看似简单,实际做起来也不容易. 写html还是比较简单的,撸起袖子就可以写完.可要想做到上图的样式就难了,难就难在CS ...

  2. 编程,将data段中的字符串转化成大写

    assume cs:code data segment db 'conversation' data ends code segment start: mov ax,data mov ds,ax ca ...

  3. MVC和Web API的区别

    最近几次面试时碰到过面试官提问这个问题.我一开始觉得这两个根本没有可比性,其中有一位面试官说,有不同啊,比如继承的基类不同,webapi继承的事APIController,等等. 今天我就总结一下,其 ...

  4. Linux移植之内核启动过程start_kernel函数简析

    在Linux移植之内核启动过程引导阶段分析中从arch/arm/kernel/head.S开始分析,最后分析到课start_kernel这个C函数,下面就简单分析下这个函数,因为涉及到Linux的内容 ...

  5. overflow visibility opacity(透明度) vertical-align 等等

     一,overflow属性:   1,四个值:    visible     默认值.内容不会被修剪,会呈现在元素框之外.    hidden        内容会被修剪,并且其余内容是不可见的.   ...

  6. Android Studio 发布 APK

    打开发布设置窗口 打开Generate Signed APK...窗口,点击Create new... 打开Create New...窗口,创建一个Key,这个Key的相关信息一定要好好保存,因为以后 ...

  7. Linux_(1)基本命令(上)

    一.基本命令1.我是谁 whoami --who am i2.谁在线 who w3.显示当前路径(定位) pwd4.切换目录 cd ~返回主目录 cd ..返回上一级目录5.查看某个目录中的子目录和文 ...

  8. andorid 手机外部储存

    .xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android ...

  9. HDOJ4734 F(x)

    原题链接 数位\(DP\),继续套记搜模板 定义\(f[pos][now]\),\(pos\)是枚举到的位数,\(now\)是\(A\)的权值减去当前枚举的数的权值,即剩余权值大小. 然后就是记搜模板 ...

  10. vc项目中加载多个lib遇到的问题

    一个VC项目中 在网络加密 json解析等方面  加载了多个第三方库和文件 boost cryptpp rapidjson  mysql的连接池等等 在使用mysql++的时候 多次报错 LNK 20 ...