Commandline Java Debugger

孤街醉人 提交于 2020-01-13 08:59:32

问题


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


回答1:


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 :

  • Jython



回答2:


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!




回答3:


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.



来源:https://stackoverflow.com/questions/6806775/commandline-java-debugger

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!