0

I am learning scala in my free time. When I was programming in python with Pycharm, Pycharm provides a very handy tool called debug console which, if I set a breakpoint at line L, would store the value of the variables by the time of L, and I can freely explore some operations on those variables.

I know scala has a REPL tool and I am wondering if scala in Intellij IDEA has the similar debug console. I know I can use evaluate expression tool but it is a little difficult to use because

  1. I can't see the previous calculated expression values and I have to retype every time to see the values.

  2. I can't store the result of the expression on one variable and continue using that variable.

Thanks!

1 Answer 1

1

If you set a breakpoint on a line (click in left margin to get a red dot) and then Debug rather than Run (bug icon rather than play icon) then IntelliJ will stop at the first breakpoint and show a very comprehensive debugging window. You can evaluate an expression (calculator icon) and create a watch expression which is evaluated each time a breakpoint is hit (watch panel on the right).

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.