6

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 can be used in command-line mode to choose from? Preferably this would be as powerful, convenient, and functional as gdb is for regular programs, but for Java.

Again, I am not interested in anything that is part of some IDE. This needs to be a command-line tool like gdb is. I use vim for editing my code, not an IDE.

tchrist
  • 78,834
  • 30
  • 123
  • 180
Frank Cheng
  • 5,928
  • 9
  • 52
  • 80
  • Any reason for not using an IDE like Eclipse with an integrated debugger? – Guillaume Polet Apr 11 '12 at 09:50
  • 1
    I am debugging on android devices. And eclipse works not very well. Sometimes can enter debug mode, but sometimes without luck. But jdb can always debug normally. And i haven't open eclipse for a long time since i start developing with vim. – Frank Cheng Apr 11 '12 at 09:53
  • Eclipse is definitly the way to go on android. The debugger works fine but some devices have some troubles on implementing debugging features of the android platform and maintaining the connection with the debbuger. Try eclipse + ADT, the debugger is just working as expected, maybe try to put your hands on a more robust device for developments. – Snicolas Apr 11 '12 at 10:47
  • In fact, the common app can debug but not the special apps. Such the stock contacts. calendar... – Frank Cheng Apr 11 '12 at 10:58

1 Answers1

0

rlwrap-jdb, as mentioned in this related post is just a wrapper around jdb but brings it much closer to a gdb experience. From the rlwrap-jdb README.md:

rlwrap-jdb is a rearguard effort to make jdb almost usable. It uses to rlwrap not to add not only command-line editing and history, but (using rlwrap's nifty filter mechanism) handy aliases, command repetition, and completion of breakpoints and variables.

To use, just prepend rlwrap-jdb to your jdb command: rlwrap-jdb jdb ....

Community
  • 1
  • 1
teichert
  • 3,963
  • 1
  • 31
  • 37