jdb

debug gradle-built project with jdb

故事扮演 提交于 2019-12-11 05:25:47
问题 I'd like to use jdb with a gradle-built project. The project's build instructions require running a ./gradlew run , which eventually launches a command like: /abs/path/to/java -Dorg.gradle.appname=gradlew -classpath /abs/path/to/uaa/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain run I replaced java with jdb, jdb -Dorg.gradle.appname=gradlew -classpath /abs/path/to/uaa/gradle/wrapper/gradle-wrapper.jar org.gradle.wrapper.GradleWrapperMain run then issue run , this runs

JDB stops on every exception - how to prevent this

不羁的心 提交于 2019-12-11 02:38:24
问题 I am using a jdb dubugger, and the problem with it that is stops on every caught exception, though I did not execute any catch .... statements. During class loading there are hundreds of them: Exception occurred: java.io.FileNotFoundException (uncaught)"thread=Thread-2-EmulatorEngine", sun.misc.URLClassPath$JarLoader.ensureOpen(), line=634 bci=30 Is it any way to instruct jdb to skip these exceptions ? PS. I have heard about IDE editors of cause. Have reasons to use jdb. 回答1: I realized that

why jdb won't recognize the “Integer” class?

不羁的心 提交于 2019-12-11 02:14:15
问题 I connect like this: $ jdb -connect com.sun.jdi.SocketAttach:hostname=x.x.x.x,port=8008 In the jdb prompt I do this: > stop in com.me.some.Gizmo.function Then it breaks correctly, but when I do this: > print Integer.parseInt("4") It outputs this: com.sun.tools.example.debug.expr.ParseException: Name unknown: java.lang.Integer Why on earth can't jdb recognize the "Integer" class?? 回答1: Although java allows classes from the package java.lang to be referenced without the fully qualified name,

How do attach to a remote Java debugger using Visual Studio Code

試著忘記壹切 提交于 2019-12-11 00:16:25
问题 I am trying to configure Visual Studio Code so that I can use it instead of IJ for debugging a complex Java app. Because of reasons too complicated to get into, I have been running on a terminal using mvnDebug then connecting using JDB. In IJ I set this up as a remote debugger, however, I can't seem to find the same option in VSC. I have tried this extension, but I can't figure out how to configure it for just JDB (I shouldn't need startupClass etc). How do I use JDB with Visual Studio Code?

直接使用JDB解决ndk-gdb调试时的“waiting for debugger”弹窗不消失问题

痞子三分冷 提交于 2019-12-10 16:38:06
一 概述 如题的情况,我是在苹果(Mac)的笔记本电脑上调试时遇到的。我查了一下,已经有网友遇到过类似的情况,其解决方法多数是,杀进程\重启\启动两个eclipse调试.杀进程\重启的方法我试过,对我的情况不起作用,启动两个eclipse调试的方法我没有试,因为安装eclipse时出了些问题没有安装成功。现在回想起来觉得本文所说的方法,应该是可以配合eclipse或Android Studio解决问题的。因为这两个IDE其Java调试的底层也是用JDB实现的。 二 问题描述 *(Mac)OS X Yosemite 版本 10.10.2 * Android SDK + android-ndk-r9c + ant + emacs (eclipse没安装成功,所以没有用) 用NDK(android-ndk-r9c)的ndk-gdb —start 调用试(sample的)hellojni。但一启动后就一直卡在如下这个画面。我按模拟器的返“回键”,也关不了这个“waiting for debugger”弹出窗口。gdb已经是成功启动的,但是程序就是run不起来。 三 解决方法 因为直接使用JDB调试有一个问题,那就是程序要已经启动了,JDB才可以连接。这个就会“错过”了程序启动的的代码。我在网上查到了一种直接用代码停住程序的方法:加入“android.os.Debug

How does Eclipse debug code in an application server?

好久不见. 提交于 2019-12-09 17:39:06
问题 What communication is going on between Eclipse and my application server (JBoss) when I run the server from within Eclipse in debugging mode? How does this work? 回答1: When you start the server in debug mode, it listens on a specified TCP port. Eclipse connects to that port, and they talk using the Java Debug Wire Protocol (JDWP). Read the details here: http://java.sun.com/j2se/1.5.0/docs/guide/jpda/ 回答2: I think it is called JDWP (Java Debugging Wire Protocol) - read more here 回答3: Eclipse

Deferred breakpoints: when are classes loaded

六月ゝ 毕业季﹏ 提交于 2019-12-07 18:33:52
问题 I am trying to debug maven with: jdb -attach 8000 , after using mvnDebug . I try to put breakpoints, but get: main[1] stop in DeployMojo.DeployMojo Deferring breakpoint DeployMojo.DeployMojo. It will be set after the class is loaded. main[1] stop at Dependency:66 Deferring breakpoint Dependency:66. It will be set after the class is loaded. When I run, the breakpoints are not called. I have the sources (generated with a maven command), but how can I make them available to the debugger? Is

Java jdb remote debugging command line tool

别说谁变了你拦得住时间么 提交于 2019-12-05 23:12:41
问题 anyone have any experience using this? if so, is it worth while? 回答1: I just used jdb for the first time yesterday and am really pleased with the results. You see, I program in Eclipse on my laptop, then deploy to a VM to make sure the whole shebang still works. Very occasionaly, I'll have to work on something that gets executed standalone, as a commandline. These things sometimes need debugging. This has always been a problem, because I don't want to go to the trouble of installing Eclipse

Java jdb remote debugging command line tool

柔情痞子 提交于 2019-12-04 04:18:36
anyone have any experience using this? if so, is it worth while? Johan I just used jdb for the first time yesterday and am really pleased with the results. You see, I program in Eclipse on my laptop, then deploy to a VM to make sure the whole shebang still works. Very occasionaly, I'll have to work on something that gets executed standalone, as a commandline. These things sometimes need debugging. This has always been a problem, because I don't want to go to the trouble of installing Eclipse on the VM (it's slow enough already!), yet I don't know of an easy way to get it to connect to my

How do I pass console input to a running Java program instead of to jdb?

跟風遠走 提交于 2019-12-03 17:20:19
问题 Debugging my code with Java's jdb. Am stuck at a point where my program expects command-line input, but jdb intercepts it as a jdb command. How do I tell jdb to pass through text to the running program? Version: C:\Documents and Settings\*snip*>java -showversion java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) Compile: javac -g LZWDecompress.java jdb.ini: stop in LZWDecompress.decompress run monitor