Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Eclipse dynamically evaluate expressions?

In some Java IDEs (BlueJ and DrJava, for example), the user can open an interaction window where Java expressions and statements can be typed in. The IDE quickly compiles and runs the code, displaying the returned value if necessary.

In BlueJ, it's called the Code Pad. It's similar in spirit to the Interaction Pane in DrRacket/DrScheme.

Does something like this exist for Eclipse?

like image 782
Barry Brown Avatar asked Apr 19 '11 00:04

Barry Brown


2 Answers

You may be looking for Scrapbook pages. Here's a write-up and here are other SO questions which talk about it.

like image 88
Michael Brewer-Davis Avatar answered Sep 25 '22 14:09

Michael Brewer-Davis


There is also the Display View, which allows executing code while debugging. It's handy, because it evaluates in the context of the current stack frame.

like image 25
sbridges Avatar answered Sep 22 '22 14:09

sbridges