Questions tagged [jdb]

The Java Debugger, jdb, is a simple command-line debugger for Java classes.

The Java Debugger, jdb, is a simple command-line debugger for Java classes. It is a demonstration of the Java Platform Debugger Architecture that provides inspection and debugging of a local or remote Java Virtual Machine. Documentation available at http://docs.oracle.com/javase/7/docs/technotes/tools/windows/jdb.html .

174 questions
2
votes
3 answers

way to debug java frameworks on console

I am a C++ dev, working in java technology for about a year. Forgive my ignorance, but I have tried to search for following two questions. What is the best way to debug in console for a java application (ala gdb in good ol' C++). It seems jdb is…
everCurious
  • 195
  • 3
  • 15
2
votes
1 answer

Debug java application in 32bit mode

Using OpenJDK 7 from the command line on OS X Lion, how can I use jdb to debug an application that requires execution under a 32-bit JVM, due to JNI native code? I know I can invoke java as java -d32 and it will use a 32-bit JVM. I can also pass…
MvG
  • 57,380
  • 22
  • 148
  • 276
2
votes
1 answer

How to break into debugger within a jUnit test case?

I'm debugging a unit test in a large java project. I need to run 'ant test ...' to launch the test suite. So it's difficult for me to launch it from the IDE. Is it possible to call some function like Debugger.Break() in C# to break into the debugger…
woodings
  • 7,503
  • 5
  • 34
  • 52
1
vote
1 answer

How can I set breakpoints on all methods in class or in all class in package or by regex in JDB?

Official docs say how set individual breakpoint on source line or class method: http://docs.oracle.com/javase/1.5.0/docs/tooldocs/solaris/jdb.html But I am interesting to make debug session in which I travel through all methods in selected…
gavenkoa
  • 45,285
  • 19
  • 251
  • 303
1
vote
1 answer

How to debug GWT Projects in JDB?

I m having a GWT Eclipse Project , i m using Eclipse to debug the Project. The GWT Project is dependent on other projects too. Its really easy using Eclipse debugger, but consumes more memory. The Java Process consumes 500MB and eclipse around 500…
Manikandaraj Srinivasan
  • 3,557
  • 5
  • 35
  • 62
1
vote
1 answer

Oracle JDB Thin Client - Unique index with varchar2 not used

First som basics. Java 6 OJDBC6 Oracle 10.2.0.4 (also the same result in 11g version) I am experiencing that a sql statement is behaving differently when executed from Java with the OJDBC6 client and using the tool SQL Gate that probably uses a…
jdsthlm
  • 51
  • 5
1
vote
1 answer

jsadebugd/jdb and running clear JVM

Using jsadebugd or jdb it's possible to debug already running JVMs, started without any arguments. I don't understand how it's possible, because I thought, that JVM compiles bytecode in native code by JIT, and it cannot be debuged. Can anybody…
1
vote
1 answer

Gradle: How to debug a source code of a dependency

I'm using jdb debugger and I'd like to step into the dependency code. I'm using gradle as well. Here is my build.gradle plugins { id 'java' id "io.spring.dependency-management" version "1.1.0" } repositories { …
xralf
  • 3,312
  • 45
  • 129
  • 200
1
vote
2 answers

java jdb does not display code lines in step output

Trying to learn the jdb from the command line. From tutorials I expect to see the code line output when I step lines, but I am not. Here is sample code I compiled: public class Main { public static void main(String[] args) { …
mpettis
  • 3,222
  • 4
  • 28
  • 35
1
vote
1 answer

How does java jdb eval multiple line code?

like for-loop is there any solution to evalute code dynamicly? eval also unsupport import keyword. main[1] eval java.lang.Class.forName("java.util.stream.IntStream").getDeclaredMethods() …
CS QGB
  • 297
  • 1
  • 3
  • 12
1
vote
0 answers

Can't attach jdb to maven test debug session

I'm debugging a test using maven: mvnDebug test Maven says the debug server is running at port 8000, so I try to attach a jdb debug session to it: jdb -sourcepath ./src/main/java/:./src/test/java/ -attach 8000 A number of problems arise here. I…
ashabbir
  • 21
  • 2
1
vote
0 answers

How to print the stack trace of the java side from a core file

I have a program written in C++, it will use JNI to launch a JVM and run the java code. But now the program crashed and generate a core file. When I attach the core with the gdb by `gdb , only the top two frames are shown, and others…
EvanL00
  • 370
  • 3
  • 13
1
vote
1 answer

jdb not recognizing '--add-reads' option

I'm working on a project where an invocation of a java file is returning a NullPointerException, but I'm not getting any clues as to why, so I'd like to run it through jdb. According to to this page, I should be able to simply replace the call to…
HardcoreHenry
  • 5,909
  • 2
  • 19
  • 44
1
vote
0 answers

Is it possible to detect whether jdb has set a valid breakpoint?

When debugging using intellij idea, if I'm connected to a remote jvm, valid breakpoints will turned to a red check mark, and invalid checkpoints will turn into a grey icon. But when I use gbd to stop at noWhere.noClass:noLine, it will not tell me…
theotheo
  • 145
  • 2
  • 9
1
vote
1 answer

Debugging Java servlet with jdb. How to attach jdb with Tomcat

I have a tomcat running after making configuration and when I type jdb in terminal it says initializing. So I like to know How to attach jdb with tomcat and specify servlet name. What is the compile option (like in C its eg. -g with gdb) to…
user786
  • 3,902
  • 4
  • 40
  • 72