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
1
vote
1 answer

Clojure and the Java Debugger

Clojure is a language that runs on the JVM. The Clojure compiler compiles and emits JVM byte code. 'jdb' is a jdk tool, a Java debugger tool, that can be used to set breakpoints, step through code, and display variable values. However, when I run…
1
vote
1 answer

Debugging a libgdx application from the terminal JDB

I have been working on a LibGDX game/application, and due to the use of Gradle was not really sure how to debug it. I don't use an IDE and mostly debug with JDB but couldn't find anywhere how to do it. The documentation is not very revealing either.
cstml
  • 350
  • 1
  • 12
1
vote
0 answers

Inspect Operand Stack and Local Variable Array of a JVM Frame using JDB

Is there a way in JDB to inspect the operand stack and local variable array of the current frame? The help command says that there's a locals command that can be used to list the local variables but with some classes it says Local variable…
John Stanford
  • 993
  • 1
  • 7
  • 18
1
vote
0 answers

JUnit 5 - new annotations - debug with JDB

I'm having trouble debugging test methods (written in Java) that use JUnit 5 via JDB. More specifically, I can debug test methods with the annotation '@Test', but I can't with methods that use the annotations '@ParameterizedTest' and…
1
vote
0 answers

Breakpoint on Entry for Every Method in JDB

Is it possible to make JDB pause upon entry into any method? I can manually specify which methods to stop at by using the stop in command, but I would like to apply the breakpoint to all methods that are executed.
Kento Nishi
  • 578
  • 1
  • 9
  • 24
1
vote
1 answer

I get this error: 'jdb' is not recognized as an internal or external command, operable program or batch file."

I tried remote debugging using Java debugger(jdb). Even though I have installed the jdk and set the JAVA_HOME variable properly but I get an error as above mentioned. 'jdb' is not recognized as an internal or external command, operable program or…
1
vote
0 answers

Can't catch problem with java debugger jdb

I have the application which crashes without any message. I try to debug it with jdb. I run jdb with command: /opt/app# jdb -classpath /opt/app/app.jar:app.Main Initializing jdb ... > catch throw Deferring all throw. It will be set after the class…
tester
  • 43
  • 2
  • 8
1
vote
2 answers

Using jdb to step inside object construction during execution

I use jdb for my Java development. For my application I have two classes: WordUniverseTest and WordUniverse, and the main method is contained in WordUniverseTest. When I execute WordUniverseTest inside of jdb, I construct a WordUniverse object…
HolyKnowing
  • 121
  • 3
  • 15
1
vote
0 answers

How to use jdb commands correctly if there exist multiple classes with the same full class name?

First, It is possible to have two classes with the same full class name in a single JVM. It can be done with custom classloaders, just like what tomcat did. But the question now is how am I supposed to use jdb against it? When I use redefine…
du369
  • 821
  • 8
  • 22
1
vote
2 answers

Prevent spark jdbc write from changing the table structure

I am using spark df write to write to oracle table - When the data is written the underlying oracle table structure is changed by spark df.write. mode(SaveMode.Overwrite). jdbc(targetJdbcUrl, targetTable,…
surajz
  • 3,471
  • 3
  • 32
  • 38
1
vote
1 answer

set args for JDB

The command I use to execute my Java code is: java -cp /usr/local/share/java/dbus.jar:/usr/local/share/java/unix.jar:/usr/local/share/java/debug-disable.jar:. \ -Djava.library.path=/usr/local/lib/jniCaller3 org.freedesktop.DBus"…
jski
  • 685
  • 6
  • 14
1
vote
1 answer

How do I attach a debugger to a Java program running with Commons Daemon Service Runner?

I would like to do some debugging on a Java program running on Windows: backtrace, print some variables, set breakpoints, single-step through a critical function. The first thing I tried was jdb -attach 5312. This failed with "shmemBase_attach…
user2404501
1
vote
1 answer

How to print out all the methods called during the execution of a Java program?

I have a Java program (jar file) and I wish to print out all the methods called during the execution of that program. So if Class1.main() calls Class1.foo1(), initiates Class2, calls Class2.foo2() and Class2.foo3(), then I want the output to be…
Nopslide
  • 121
  • 2
  • 7
1
vote
1 answer

Debugging Java get list of objects and local variables

Is there any way to get a list of all current objects and local variables when debugging a java program? Seems JDB doesn't offer such functionality. I only can inspect vars and objects if I know the name of them. My aim is to step through any line…
Vetterjack
  • 2,227
  • 4
  • 19
  • 31
1
vote
2 answers

Extracting Data from CLOB data using SQL from Oracle Database

I have a table named "device" which contains a column named as "XMLdoc" of CLOB datatype. I want to update the Value field. Name="DropDirectory" Value="" /*Following is the sample XML:*/
Puru
  • 21
  • 5