JDisplay, but better!

JDisplay is pretty cool. It is a view available when using Eclipse JDT's debugger that allows you to execute code and inspect the result when you are stopped at a break point. This is very useful as not only does it allow you to inspect the objects as they currently are (which other views allow you to do pretty well) but it also allows you to see what the return value of a method would be if it was called from here.

JDisplay as it currently looks.

JDisplay as it currently looks.

While the idea is awesome, it adds a little bit of interactivity to your Java development, the design is a little lacking as far as I'm concerned. In order to execute some code I have to:

  1. Write some code (go figure).
  2. Take my hands of the keyboard and select that code.
  3. Click on a button in the top right corner of the view.

The output then gets dumped back into the same input buffer I was using to write code in in the first place. That works okay for the first evaluation, but after your second or third go, it starts to get really messy.

What I want is to be able to do is write code and hit <ENTER> and see the results. I want to be able to hit <UP> and reuse code that I've already written without having to worry about it having been clobbered by the output of subsequent evaluations. I want a Read-eval-print loop for Java debugging.

Time to Stop Whining and be Constructive

Here's where I prove that more than just a useless whiner: Here's a mock-up of what I think JDisplay should look like:

Mock-up of what JDisplay could look like.

Mock-up of what JDisplay should look like.

I even have a vague idea of how I would implement it and noble intentions to develop a patch against JDT.

I'll let you know how that goes.