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

Debugging Java with JDB and Gradle

I have a simple 'HelloWorld' class within a small project that was initiated with Gradle (gradle init --type java-library). The HelloWorld.java file is located in [project]/src/main/java/HelloWorld.java. The project gets compiled when I run…
Eyal Zinder
  • 614
  • 1
  • 8
  • 21
1
vote
1 answer

Add jar libraries to jdb when debug

I want to use jdb (command line) to debug my source. My source will use some external jar libraries (ex: ojdbc). How to config jdb refer to external jar library?
Dieu Luong
  • 133
  • 3
  • 12
1
vote
1 answer

How to run custom code in JDB session?

In an IDE like IntelliJ I can stop the execution at a breakpoint and then execute arbitrary code using the snippet view. Can I do the same when using commandline debugger JDB attached to a process? I suspect that under the surface IntelliJ uses…
Kshitiz Sharma
  • 17,947
  • 26
  • 98
  • 169
1
vote
1 answer

Where can I find the jdb (java debugger) implementation? Who develops/maintains it?

I want to know how it is implemented because I want to play around with it.. Asking here because searching "jdb" on Google only shows the documentation of it. Otherwise there are tutorials and stuff, but these are not so useful when what you…
ilk
  • 23
  • 1
  • 5
1
vote
1 answer

jdb stop at given line or method

As a CLI-inclined programmer, I'd like to ask if the Java command line debugger JDB is capable of running from current position and stopping at given line? For instance, 200 public Trade create(TradeCreateReq req) { 201 …
schnell18
  • 290
  • 5
  • 8
1
vote
1 answer

How to compile a project with maven so that it can be debugged from jdb?

I am trying to learn jdb. I have a maven project. I tried debugging it with jdb when I use the list command I am not able to see any source code. I get this message: main[1] list Source file not found: App.java So how should I compile a project…
morpheus
  • 18,676
  • 24
  • 96
  • 159
1
vote
1 answer

How to use jdb to debug a hadoop jar job?

I am running a hadoop job like this: bin/hadoop jar /usr/joe/wordcount.jar org.myorg.WordCount /usr/joe/wordcount/input /usr/joe/wordcount/output My question: How can I debug this with jdb? I don't need remote debugging. The job is running on same…
morpheus
  • 18,676
  • 24
  • 96
  • 159
1
vote
1 answer

Output is incomplete when running jdb as a process from java application

I'm trying to debug a java class from java program. I created a simple class to test. This is my class hello.java and it lies in the folder C:\Users\madhawax\Desktop\beaufify\debugging My problem is that I can't retrieve the part VM Started: Set…
Madhawa Priyashantha
  • 9,633
  • 7
  • 33
  • 60
1
vote
0 answers

Android: startService ends up in java.lang.RuntimeException - how to debug with jdb?

I am trying to create a simple app which would run a background thread. The aim is to send some data to my pebble watch, like the phone battery status, etc. I looked here:…
1
vote
1 answer

JDB: com.sun.tools.example.debug.expr.ParseException: Unknown operation: %

Whenever I try to evaluate something with the modulus operator (even something as simple as print 5 % 4) in JDB, I get the error message com.sun.tools.example.debug.expr.ParseException: Unknown operation: % and 5 % 4 = null. It's only my second…
tsleyson
  • 319
  • 5
  • 18
1
vote
1 answer

Attaching debugger to JVM created by JNI_CreateJavaVM

This is on Ubuntu 12.04/ Java 7, 64bit Working on project to create java bindings for WebkitGtk Version 2. My primary interest in WebkitGTK is DOM access and manipulation as against just displaying web pages. For V2, WebkitGtk team changed…
user871199
  • 1,420
  • 19
  • 28
1
vote
1 answer

jdb annoying package name while debugging

I'm trying to debug my applications with jdb. I acquired a lot of things until now but I would like to polish them. When I'm in jdb and I would like to insert a breakpoint or inspect a variable jdb needs the whole name…
Marc Sola
  • 434
  • 4
  • 15
1
vote
1 answer

Is it possible to set breakpoints at a specific bytecode instruction?

I'm using jdb to remotely debug a Java application of which I don't have the source code. Furthermore, the application jars are obfuscated. I can set method breakpoints but, is it possible to set breakpoints at a specific bytecode instruction…
danidiaz
  • 26,936
  • 4
  • 45
  • 95
1
vote
1 answer

Print multiple variables with one command in jdb

How can I print multiple local primitives with one command in jdb (verison 1.4)? I've tried: print v1, v2, v3 but that only prints out the value of v1. Any suggestions? Edit: Effectively I need a watch in jdb.
C. Ross
  • 31,137
  • 42
  • 147
  • 238
0
votes
0 answers

jdb: okhttp3/HttpUrl NoClassDefFoundError

I have this code // App.java import okhttp3.HttpUrl; public class App { public static void main(String[] args) { HttpUrl url = HttpUrl.parse("https://example.com"); // ... } } When I run $ gradle clean $ gradle build $ gradle run It…
xralf
  • 3,312
  • 45
  • 129
  • 200