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
5
votes
2 answers

how to attach debugger to remote Hadoop instance

I am not looking for these so-called "debugging" solutions which rely on println. I mean to attach a real debugger to a running Hadoop instance, and debugging it from a different machine. Is this possible? How? jdb?
T. Webster
  • 9,605
  • 6
  • 67
  • 94
5
votes
1 answer

jdb print caught exception message

I have exceptions thrown in my java code when an error occurs. I then run the code using jdb so when the exception occurs, I can see the state that the code is in and debug. For all exceptions that I throw, I put in a useful string message. However,…
user2019811
  • 53
  • 1
  • 4
4
votes
2 answers

Can I write scripts for JDB - the java debugger

I am using JDB to remote debug a program. Can I write scripts within JDB so that i can write loops and if-else conditionals to control how JDB executes and record the jdb output to a file. My reference document for this is GDB Scripting.
Xolve
  • 22,298
  • 21
  • 77
  • 125
4
votes
2 answers

Can a single java thread be killed from jdb?

In theory, the JDB (java debugger) allows for a single thread to be killed. In practice, is it possible? Here I attach jdb to my JVM, which has an agentlib at port 8000: $ jdb -attach 8000 > I list the threads: > threads Group system: (java.lang…
Albert Cardona
  • 221
  • 2
  • 8
4
votes
2 answers

How do you run DDD for Java?

I was following this tutorial here and got a popup that says "cannot access class test" after I typed in %javac -g test.java %ddd -jdb test &
user299648
  • 2,769
  • 6
  • 34
  • 43
4
votes
3 answers

jdb : Perform a pre-defined action at a breakpoint

While debugging a java application using jdb, is it possible to set a break-point with a pre-defined action. For instance if I am interested in knowing what the value of a certain variable is when the flow passes through a certain point, I can set a…
Gautam
  • 1,862
  • 9
  • 16
4
votes
1 answer

Android app debugging with command line jdb

I'm configuring emacs to debug android apps. My problem is since I'm attaching jdb to DDMS I cannot set proper classpath (jdb just won't start when I try to set -classpath and -attach together). So jdb is practically blind - no entry point for…
Stormherz
  • 376
  • 2
  • 11
4
votes
1 answer

Visual Studio Code - "Error:spawn jdb ENOENT" trying to debug java app

I am trying to debug java application in Visual Studio Code and getting following error: "Error:spawn jdb ENOENT". Vs Code is suggesting to update my launch.json which have following: { "version": "0.2.0", "configurations": [ { …
George Trifonov
  • 1,971
  • 17
  • 20
4
votes
1 answer

Debugging in java with jdb : "Error: impossible to find or load the main class"

it's my first project in java and I'd like to us jdb as a debugging tool, but I'm having some issues. Could you help me please? The file with the "main" function is "Frame.java". I have also lots of other .java files in the same repertory, and they…
Dreamk33
  • 245
  • 3
  • 13
4
votes
2 answers

jdb with android apps - unable to open source file

I am hoping to use jdb to debug android apps in the emulator via the ddms go between. I have successfully set a breakpoint in my class' onCreate and the debugger (jdb) duly breaks. However if I try to "list" the code it says it can not find the…
RichieHH
  • 2,116
  • 4
  • 28
  • 30
4
votes
1 answer

Java Debugger runs application without breaking

I have the ubiquitous HelloWorldApp.java file /** * The HelloWorldApp class implements an application that * simply prints "Hello World!" to standard output. */ class HelloWorldApp { public static void main(String[] args) { …
mpdunson
  • 227
  • 1
  • 11
4
votes
3 answers

Android with jdb confusion using waitForDebugger

I'd like to debug my Android application on my device (Nexus One - not the emulator) using the command line. I'm confused at how to set a breakpoint using jdb in combination with android.os.Debug.waitForDebugger. Say I put the following code in my…
mmgcs
  • 43
  • 1
  • 3
4
votes
0 answers

jdbRealm and BASIC http: Password login succeeded, webpage displays 403

I've created a simple maven web project and try to secure it with BASIC authentication and jdbRealm. On my glassfish 4.0 server i've created a realm and enabled 'Default Principal To Role Mapping'. Security logging level is set to finest. my…
user4059540
4
votes
0 answers

Unable to set breakpoints using jdb and sbt

I am having trouble getting my breakpoints to hit in jdb when attaching to sbt. I wrote the following scala code, and put it in a file called test.scala: object test extends App { def foo(x: Int): Int = { print(".") Thread.sleep(100) …
gens
  • 972
  • 11
  • 22
4
votes
3 answers

How do I skip a breakpoint a set number of times in Java's jdb?

How do I skip a breakpoint a set number of times in jdb? jdb's help provides this hint: !! -- repeat last command -- repeat command n times # -- discard (no-op) When I attempt…
iokevins
  • 1,427
  • 2
  • 19
  • 29
1 2
3
11 12