As we can see from the previous section, we can run a Java application and the 'jdb' debugger separately in shared memory mode. But this requires that the Java application and the 'jdb' debugger must be running on the same machine.
If you have a large application that you need to run a big server machine, you can debug that application by running the 'jdb' debugger on your own desktop machine using the socket debugging communication mode as presented in the previous section.
Let's try it now. Open a command window on a windows system and run:
C:\herong>java -agentlib:jdwp=transport=dt_socket, address=localhost:8888,server=y,suspend=y Hello Listening for transport dt_socket at address: 8888
The target application is launched in "socket server" mode. Its execution is suspended. Now open another command window and run:
C:\herong>jdb -connect com.sun.jdi.SocketAttach:hostname=localhost, port=8888 Set uncaught java.lang.Throwable Set deferred uncaught java.lang.Throwable Initializing jdb ... > VM Started: No frames on the current call stack main[1] stop in Hello.main Deferring breakpoint Hello.main. It will be set after the class is loaded. main[1] cont > Set deferred breakpoint Hello.main Breakpoint hit: "thread=main", Hello.main(), line=3 bci=0 3 System.out.println("Hello world!"); main[1] quite
Cool. I know how to run "jdb" to debug an application running on a remote machine now!
However, the command suggested in the JPDA documentation did not work:
C:\herong>jdb -attach localhost:8888 java.io.IOException: shmemBase_attach failed: The system cannot find the file specified at com.sun.tools.jdi.SharedMemoryTransportService.attach0(... ...
My guess is that the Windows version of "jdb" assumes "shared memory" as the default transport mode.
相关推荐
java查看sun包源码 Java 远程debug 一、remote debug 何为远程debug呢?通常我们在开发过程中,都会将代码部署到服务中,这个时候QA 提出了一个bug,通过查看代码的逻辑发现问题十分的困难?一般情况下都是想着本地能...
Debug时修改代码能即时生效的说明,帮助大家在debug时解决无法及时生效的问题
│ │ RemoteHost.java │ │ RemoteHostFactory.java │ │ RemoteUSBListener.java │ │ USBD.java │ │ USBListenerProxy.java │ │ │ ├─test │ │ ControllerUSBListener.java │ │ USBController.java ...
启动本地postgres数据库: ... docker build -f Dockerfile.local -t openshift-java-demo . 现在运行dockerized应用。 我们必须使用--link标志,以允许演示应用程序与数据库容器进行通信 docker run
vscjava.vscode-java-debug-0.20.0 scala-lang.scala-0.3.4 eg2.vscode-npm-script-0.3.8 vscjava.vscode-maven-0.18.1 ms-vscode.go-0.11.4 lextudio.restructuredtext-113.0.0 pkief.material-icon-theme-3.8.1 ms...
自己写的介绍java远程调试的ppt。有jvm的调试模型,eclipse的调试技巧,远程调试介绍,环境搭建。并有一个demo演示截图。
Defines the rmic compiler for generating stubs and skeletons using the Java Remote Method Protocol (JRMP) and stubs and tie class files (IIOP protocol) for remote objects. jdk.scripting.nashorn ...
vscjava.vscode-java-debug-0.20.0 scala-lang.scala-0.3.4 eg2.vscode-npm-script-0.3.8 vscjava.vscode-maven-0.18.1 ms-vscode.go-0.11.4 lextudio.restructuredtext-113.0.0 pkief.material-icon-theme-3.8.1 ms...
Java Debug Wire Protocol (JDWP) JVMTM Tool Interface (JVM TI) (replaces JVMPI and JVMDI) -------------------------------------------------------------------------------- JDK Tools and ...
在线调试 介绍 在线网络服务调试系统,不生产数据,只做数据的搬运工,可以通过串行远程调试的效果,再也不用加参数日志啦...properties文件中的机器agent.remoteHost参数,替换启动机器的域名地址 直接打包或安装模块d
允许可选的调试日志记录,这还将在堆栈跟踪中将您的应用程序标记为DEBUG构建 另请参见: 以下是Android Remote Stacktrace的原始文档,并对我所做的一些API更改进行了少量修改。 客户端使用 在下载最新的trace.jar...
If you want to remote debug a single java unit test (default port is 5005): $ cd core $ mvn test -Dtest=<<YourTest>> -Dmaven.surefire.debug Integration tests In addition to the unit tests, ...
特别当部署在生产环境中的时候,这个时候一般不能debug , 当然在有些情况时可以 remote debug (远程debug)。那种情况另当别论。还是用通常的写日志的方法,比如在 java 中,经常可以看到 log4j,sf4j,logback等三方...
将脚本文件直接替换TOMCAT下bin目录 window环境通过debug.bat启动 unix 还是不变。 我设置的调试端口是31919,自己可以进行修改
You don't need to debug Java™ applications on just your local desktop. Learn how to spread around your debugging using different connection types that make up remote debugging. This article explains ...
* 最近学习了远程过程调用协议RPC(Remote Procedure Call Protocol),将本框架与dubbo做了一个集成,详见dubbo分支, * 为了方便大学家习dubbo的运行机制,本框架将dubbo的provider和customer作了一个整合,将官方...
apks are nothing more than a zip file containing resources and compiled java. If you were to simply unzip an apk like so, you would be left with files such as classes.dex and resources.arsc. $ unzip...
compile 'com.github.mobile-dev-pro:remote-logcat:VERSION' } onCreate()方法中主应用程序类中的初始化库: public class App extends Application { @Override public void onCreate () { super
Bistoury 是去哪儿网开源的一个对应用透明,无侵入的 Java 应用诊断工具。 Bistoury 的目标是一站式 Java 应用诊断解决方案,让开发人员无需登录机器或修改系统,就可以从日志、内存、线程、类信息、调试、机器和...