SvenK
SvenK

Reputation: 2722

Commandline Java Debugger

Is there a good commandline debugger for java?

I gave JDB a chance, but the Commandline interface sucks. If I want to change the last line and reexcecute it, I have to retype the whole line. A hit on [UP-ARROW] just gives me "^[[A". Also there is no completion for package/class/methodnames.

GDB is a good alternative but I don't know how to remote debug with it.

I have a Maven/Vim Setup and want to use a console debugger for java, is there a possibility to integrate GDB or another good debugger in this setup?

Greetings Sven

Upvotes: 13

Views: 6163

Answers (3)

doak
doak

Reputation: 955

The hint to 'rlwrap' is great!

I now use rlwrap -f . -f tags -e "" jdb <java> <args> which does auto completion based on history and the tags file (created with ctags --recurse) which is pretty usefull. Please refer to man rlwrap for details.

Upvotes: 6

eatnumber1
eatnumber1

Reputation: 5142

Although I haven't found a good replacement for jdb yet, I start jdb wrapped in readline using rlwrap. That way, I get history and full line editing capabilities like in bash. Sadly no completion, but rlwrap supports pluggable completions, so someone could write one!

Upvotes: 11

Saurabh Gokhale
Saurabh Gokhale

Reputation: 46395

Here you can get the list of all the command-line debuggers.

Also, not exactly a debugger, but definitely a command-line interface to Java that may help you debug :

Upvotes: -5

Related Questions