Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » Is there any *input* console for the JDT debugger?(gbd equivalent for JDT?)
Is there any *input* console for the JDT debugger? [message #811470] Fri, 02 March 2012 11:34 Go to next message
Chris S is currently offline Chris SFriend
Messages: 20
Registered: November 2011
Junior Member
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?

Re: Is there any *input* console for the JDT debugger? [message #811656 is a reply to message #811470] Fri, 02 March 2012 16:50 Go to previous messageGo to next message
Deepak Azad is currently offline Deepak AzadFriend
Messages: 543
Registered: July 2009
Senior Member
Almost all actions can be invoked by keyboard. Is that what you are
looking for?

The most frequently used commands e.g Step into, Step over have a
keyboard shortcut assigned by default. For others you can do so yourself
via Preferences > Keys.

Just open the 'Run' menu to see what all commands you have available.

--
Deepak Azad
http://wiki.eclipse.org/JDT/FAQ
Re: Is there any *input* console for the JDT debugger? [message #811973 is a reply to message #811470] Sat, 03 March 2012 03:00 Go to previous messageGo to next message
David Wegener is currently offline David WegenerFriend
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.
Re: Is there any *input* console for the JDT debugger? [message #813405 is a reply to message #811973] Mon, 05 March 2012 08:14 Go to previous message
Chris S is currently offline Chris SFriend
Messages: 20
Registered: November 2011
Junior Member
Hi David,

thanks for the hint. That could work on my home machine, so I'll try it there. But at work, I'm stuck with Windows...

Then it sounds like a suitable project to make such a plugin when I have time Smile

BR,
Chris
Previous Topic:Eclipse - unable to see New Java Project button as described by Cheat Sheet
Next Topic:NEW apache server issue
Goto Forum:
  


Current Time: Fri Apr 19 02:23:08 GMT 2024

Powered by FUDForum. Page generated in 0.02550 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top