|
|
Re: Is there any *input* console for the JDT debugger? [message #811973 is a reply to message #811470] |
Sat, 03 March 2012 03:00 |
David Wegener Messages: 1445 Registered: July 2009 |
Senior Member |
|
|
On 03/02/2012 05:34 AM, Chris S wrote:
> Hi,
>
> I'm feeling a bit annoyed with debugging Java code from Eclipse since it
> is basically point/click-based and I prefer to have an input console
> (with history) to debug with.
> Preferrably something like the gdb console so I can set breakpoints, run
> programs, step over/into, print variables with simple commands and I can
> go back in history to run the same commands. And this without having to
> use the pointer, set up run configurations etc.
> I've searched the 'net for something like this but cannot find anything.
> Anyone knows if there's some plugin out there for this? Or can I somehow
> do it with the default debugger in eclipse?
>
>
If you really want to use a command line debugger, you can get it to
work in Linux using an External Tools configuration. You might be able
to do something similar in Windows.
Setup install rlwrap on your system. This provides the command history
when running the JDB debugger. Identify your terminal program eg.
/usr/bin/gnome-terminal.
1. Run the program once in Eclipse to find out the command line. Open
the Debug Perspective, select the program in the Debug view, right click
and select Properties. This gives you the command line used to launch
the program. Select the command and copy it to your clipboard.
2. Open the External Tools configuration (Run->External Tools->External
Tools Configuration). Create a new External Program launch.
3. Enter your terminal program in the Location text field.
4. Enter -e "rlwrap in the Arguments window. Then paste the command line
used to launch your application. Change the java command name to jdb
(/usr/lib/jvm/sun/bin/java changed to /usr/lib/jvm/sun/bin/jdb). If you
need to change any other command options, make the changes. Be sure to
close the " at the end of the command arguments.
You should now be able to run the program. If all is setup correctly,
you should get a terminal window popped up and the JDB debugger started
in the window with Initializing JDB.... You now have a command line
interface to JDB.The rlwrap will allow for command history navigation to
recall commands entered.
When ever you want to debug using the command line, launch the External
Tool.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02550 seconds