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

Debugging ASM-generated bytecode with JDB (or similar)

So I have some malfuctioning code to debug where SOMEthing throws an NPE and I'd like to step through some generated methods in order to try and find out why. Except stepping blindly is not really useful. Thread-4[1] list Source file not found:…
User1291
  • 7,664
  • 8
  • 51
  • 108
7
votes
1 answer

Inspect the return value of a method in jdb

Suppose in jdb I am at the following spot in the code: return 22; -->} How do I dump the value of the object (or primitive) that is going to be returned? It seems like a pain to have to store the return value in a local variable before returning…
Ben H
  • 3,136
  • 3
  • 25
  • 34
7
votes
3 answers

How does Eclipse debug code in an application server?

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?
skiphoppy
  • 97,646
  • 72
  • 174
  • 218
6
votes
2 answers

Eclipse detail formatter string not displaying all Unicode characters

I like to see the clipboard symbol: (U+1F4CB) in the debugger. I understand the two codepoints. Whearat: \ud83d is ߓ \u8dccb is I like to detail-format to see it in the debug-tooltip in Unicode. My current…
Grim
  • 1,938
  • 10
  • 56
  • 123
6
votes
1 answer

JDB does not work on OS X 10.11

My Java version is 1.8.0_6. The JDB on my laptop can be started with a .class file, say MyClass.class. But after I type run conmmand, JDB first gives me a prompt "run MyClass", then it is stuck for a while. After that, it throws out the following…
Jay
  • 998
  • 2
  • 15
  • 24
6
votes
1 answer

execute jdb on linux transport error 202: bind failed

when I execute jdb on linux, there is an error such as ERROR: transport error 202: bind failed ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports…
ArenaGod
  • 103
  • 9
6
votes
5 answers

Cross-continent remote Java Debugging

When attaching the debugger in an IDE (IntelliJ or Eclipse) to a JVM running in another continent (london to new york) the lag is unbearable. I've waited in excess of 10 minutes for IntelliJ to populate my stackframes and fill out objects before…
ares
  • 709
  • 6
  • 13
6
votes
1 answer

Are there any better Java CLI debugger tools better than jdb?

I have successfully debugged an Android app with jdb today. But I found jdb is not as handy as gdb for me: the convenience and functionality which jdb provides are grossly inferior to those provided by gdb. Are there any better Java debuggers that…
Frank Cheng
  • 5,928
  • 9
  • 52
  • 80
5
votes
4 answers

Equivalent of GDB 'start' in JDB?

I'm a bit confused by JDB. Being fairly good at using GDB, I'm aware of the various simple commands used to control the execution, i.e. start, run, cont, step, stepi, break, etc. but there are a number of (in my opinion) unusual differences. If I…
Doddy
  • 1,311
  • 1
  • 17
  • 31
5
votes
1 answer

jdb and jde with emacs ( name unknown)

main[1] print myVariable com.sun.tools.example.debug.expr.ParseException: Name unknown: myVariable myVariable = null Any guesses as to why this might be happening? I can place breakpoints like I'm used to, but I can't access the variables.
sam-mere
  • 71
  • 4
5
votes
2 answers

Problems when trying to attach to a process using jdb

I need to attach a jdb debug session to a java application that is being executed in a remote host, but I am unable to do it. I am working on linux, with openjdk 1.8.0_65, 64-Bit Server VM. What I have tried In order to enable the port listening, I…
Dan
  • 2,452
  • 20
  • 45
5
votes
2 answers

JDB debugging of Groovy/Grails code

I'm attempting to debug some issues in some (rather bletcherous) Grails code that I inherited. I'm a relative noob in Groovy and Grails although an old Java guy. Here's the problem: I have this thing running with jconsole and jdb hooks in, but it's…
Charlie Martin
  • 110,348
  • 25
  • 193
  • 263
5
votes
2 answers

Attach jdb on uncaught exception

So, I am starting a Java program as below java -agentlib:jdwp=transport=dt_socket,address=8000, server=y,suspend=n MyClass I then manually attach a debugger as below jdb -attach 8000 I would like to know if there is anyway for me to set up jdb…
nave
  • 428
  • 5
  • 19
5
votes
2 answers

How to properly set a breakpoint in a nested class using JDB?

package com.android.internal.telephony.dataconnection; public abstract class DcTrackerBase extends Handler { protected BroadcastReceiver mIntentReceiver = new BroadcastReceiver () { @Override public void onReceive(Context…
slaadvak
  • 4,611
  • 1
  • 24
  • 34
5
votes
1 answer

Understanding how java debugging really works under the hood

My question relates to debugging - especially in java/on the jvm. I would like to know how debugging in java works under the hood: How does jdb/jvm can match the breakpoint set in java source code to the bytecode currently under execution. Can…
balteo
  • 23,602
  • 63
  • 219
  • 412
1
2
3
11 12