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

Break when a variable is assigned some value

I want jdb (which I'm using via the Eclipse debugger) to break when a variable is assigned some value. I'm not interested in setting a breakpoint at some specific line but rather more generally. For example, break every time x == null. Is such a…
Daniel
  • 499
  • 1
  • 4
  • 6
31
votes
1 answer

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

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…
Jackie
  • 21,969
  • 32
  • 147
  • 289
15
votes
4 answers

"Failed to attach to the remote VM" connecting jdb to the android emulator on Windows

I’ve been trying to connect jdb to the android emulator for a little while, and have been met repeatedly with: jdb -sourcepath ./src -attach localhost:8700 java.io.IOException: shmemBase_attach failed: The system cannot find the file specified …
Tim Barrass
  • 4,813
  • 2
  • 29
  • 55
14
votes
1 answer

What is "bci" while debugging in jdb?

While debugging with jdb on the command line, it shows me a status line after each step that looks like this: Step completed: "thread=main", [class name].[method], line=10 bci=20 What is bci and how can it be useful to me?
Anukool
  • 338
  • 3
  • 6
13
votes
1 answer

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

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…
iokevins
  • 1,427
  • 2
  • 19
  • 29
11
votes
2 answers

Blackberry debugging on Linux via bjdwp

I've gone down the long road of using Linux for Blackberry development. Currently that means: bb-ant-tools - for building net_rim_api.jar - and other Blackberry goodies from the Eclipse plugin 1.3.0 preverify - from either the J2ME SDK or WTK, I…
Matthew
  • 44,826
  • 10
  • 98
  • 87
10
votes
3 answers

Java jdb remote debugging command line tool

anyone have any experience using this? if so, is it worth while?
bmw0128
  • 1,625
  • 6
  • 25
  • 31
10
votes
4 answers

debugging android app with "jdb -attach" (or jswat)

I'm having troubles with using a stand-alone java debugger with android apps on emulator. Apparently, any remote-capable java debugger such as jdb (or jswat) could be leveraged, by following the steps below (as I understand after reading here and…
10
votes
4 answers

Use a jar with source as source for jdb?

I have a executable jar with source compiled in and I want to debug it using jdb (no other debugger available in this environment unfortunately). I am able to debug it with jdb -classpath "${JAR_FILE}:${CLASS_PATH}" ${MAIN_CLASS} ${ARGS} How can I…
C. Ross
  • 31,137
  • 42
  • 147
  • 238
10
votes
3 answers

jdb conditional breakpoint

I remote debug my application using JDB, just JDB, no IDEs, is there a way in jdb to set a conditional breakpoint? eg: stop at MyClass:80 when mystr.equals("abc")
Murali
  • 1,495
  • 2
  • 15
  • 28
9
votes
3 answers

Specifying sourcepath in jdb, what am I doing wrong?

I have a java project in which the file system is as follows: I have 3 directories: bin, src, and lib. src contains my *.java files bin contains my *.class files (compiled using the files in src) lib contains a few *.jar files imported by most…
brnby
  • 1,433
  • 1
  • 19
  • 35
8
votes
2 answers

Print variables in java jdb debugger

Is it possible to view variables, passed as arguments in function, if class was compiled without debug flag? I successfully put breakpoint on call, but after that i don't know how to view arguments value. I don't have good source code, soft is…
cdump
  • 81
  • 1
  • 2
8
votes
3 answers

JDB -- How to get a list of methods before running the program?

I'm learning JDB and running into a bit of a paradox. After starting JDB (with "jdb ClassName") most tutorials will tell me to type > methods ClassName to see a list of available methods so that I can set my breakpoints. If I do that, JDB…
Joyce
  • 81
  • 1
  • 2
8
votes
3 answers

text navigation in jdb not working in bash

When I run jdb in bash the arrow keys produce weird garbage: up: ^[[A down: ^[[B left: ^[[D right: ^[[C So I can't use the command history, or correct a spelling mistake, because I can't navigate the text at all, which is very annoying. Is there a…
bug
  • 515
  • 1
  • 5
  • 17
7
votes
1 answer

Intellij Debug Docker container keeps giving me IO Exception Handshake Failed

I am trying to setup a remote debugger in Intellij v2020.1, I keep getting the error below: Unable to open debugger port (localhost:5005): java.io.IOException "handshake failed - connection prematurally closed" In my docker compose file I have…
qwertyqwerty
  • 207
  • 5
  • 15
1
2 3
11 12