Eclipse Scala interpreter (REPL) - proper use and debugging
Asked Answered
J

1

8

I would like to know what are best practises of using Eclipse Scala interpreter (Eclipse Scala IDE).

Let's say I have application with breakpoint in it. Is it possible to debug an application in such a way, that I can execute/evaluate expressions inside REPL at the specific breakpoint? If yes how can I achieve it?

Another thing that made me wonder is what's the difference between opening the interpreter as Run configuration or opening it trough Window -> Show view -> Scala interpreter.

Do you know any other uses cases of Eclipse Scala interpreter that are interesting to know about, like for example Ctrl+Shift+X to run selected expression?

Junior answered 16/4, 2012 at 9:10 Comment(0)
V
8

Maybe it is an obvious advice, but in addition to merely starting REPL in Scala IDE you can run selected expression in it: just select the expression and press Ctrl+Shift+X (default hotkey).

Update
There is a comprehensive reference for Scala interpreter (thanks Mirco Dotta).
It is also worth to mention that in near future Scala interpreter is going to be enhanced significantly: integration with Scala debugger and implementation of a concept known as worksheet are on the way.

Varanasi answered 16/4, 2012 at 9:47 Comment(3)
At the moment REPL seems to be not very advanced, but I have high hopes for this one, assembla.com/spaces/scala-ide/tickets/1000865 It is accepted for inclusion in Milestone 2 and M2 is scheduled to July.Varanasi
Scala debuger as part of Scala IDE 2.1 will provide some net features... You can find all new features of IDE 2.1 here.Junior
For future reference, here is a link to the Eclipse Scala Interpreter documentation. @Junior is right, and we want to experiment if we can attach a REPL to the debugger so that you can evaluate expression at breakpoints.Chevy

© 2022 - 2024 — McMap. All rights reserved.