I'm using IntelliJ idea Community edition (with Scala) and I'm trying to evaluate an expression. I hit Alt-F8 to open it in debug mode and then switch to 'Code Fragment Mode'. However, I'm allowed to only evaluate variables that already exist in memory, and am not allowed to declare new. When I do so, I get- 'Evaluation of variables is not supported'. Is there a plugin that I can use in debug mode to evaluate arbitrary code?



As of now, the current version of IntelliJ (version 2016.2, build: 162.1121.32) does support variables in their expression evaluator (code fragment mode). I tried val and var, they both work as expected.

| improve this answer | |
  • Could you state the 'current' version in the answer please, as this might change over time. – djsmiley2kStaysInside Jul 23 '16 at 8:47
  • @djsmiley2k updated. Though, I doubt they're going to remove it from future versions. – morfizm Jul 24 '16 at 10:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.