Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Evaluating many expressions at once in Intellij Idea

In Intellij Idea, I'm looking for a way to evaluate many expressions in debug mode with one command.

Normally I can evaluate single command with Right Click → Evaluate Expression (ALT+F8). I would like to have possibility to evaluate a bunch of expressions like:

System.out.println(myVar1);
System.out.println(myVar2);

In Eclipse this is possible to execute such "script of expressions", but I can not find a solution in Idea.

like image 322
walkeros Avatar asked Mar 30 '15 07:03

walkeros


Video Answer


1 Answers

You have to click "Code fragment mode" in the evaluate expression dialog (Alt+F8) and you can enter as many lines as you want instead of single line - which is default - "Expression mode".

enter image description here

enter image description here

Then you can switch back anytime using "Expression mode" button.

like image 122
Vojtech Ruzicka Avatar answered Sep 21 '22 19:09

Vojtech Ruzicka