Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Commandline Java Debugger

Tags:

java

debugging

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

like image 442
SvenK Avatar asked Jul 24 '11 12:07

SvenK


2 Answers

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!

like image 105
eatnumber1 Avatar answered Nov 14 '22 02:11

eatnumber1


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.

like image 39
doak Avatar answered Nov 14 '22 00:11

doak