Sun provides the Java Platform Debugger Architecture, an API for debugging. The debugger JDB (java debugger) is a simple demonstration of how to use the API. JDB works similarly to GDB. Netbeans and Eclipse offer more comfortable controls. Anyways, in this post I give a short introduction to the JDB command line interface.
Here come the most important commands in JDB:
To run jdb in ubuntu (as stand-alone, or from within an IDE), make sure your hostname corresponds to your current ip address when you are running jdb (edit /etc/hosts, then restart networking). [1]
Launching of application similar to java command
jdb -classpath CP package1.package2.program
As I mentioned, basic commands resemble gdb's. There is run, cont, where (dump trace, similar to gdb's bt), print, next, step.
You set breakpoints with stop. Syntax:
stop in
stop at
As stated before, there are more sophisticated ways to debug java. This video is the first part of an introduction to debugging in java using eclipse. Enjoy!
U COMMENT
I FOLLOW




Subscribe to replies to this post
This conversation is missing your voice. Your feedback is appreciated.
Post a Comment
You can use some HTML tags, such as <b>, <i>, <a>
You can follow the discussion of this post by subscribing.
You are free to include information from this article on your own site if you provide a backlink. You can use the following markup: