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 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 commandjdb -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!
If you use information from this article on your site, then please provide a backlink to it. You can use the following markup:


0 comments:
What do you think?
Post a Comment