Immediate Window for IntelliJ

I am using IntelliJ 9, and I am curious if there is any IntelliJ equivalent of the Visual Studio immediate debug window. In the editor, the desired expression is selected, then ALT - F8 , but I would like to be able to write code in a window that interacts with what I'm currently debugging (if at all possible).).

It is useful to have breakpoints that log messages on the console, but I would like to do more than I can if I can.

+62
java debugging java-ee intellij-idea
Jun 24 '10 at 17:28
source share
5 answers

The Intellij IDEA Expression Evaluation dialog box has a button to enable code snippet mode, which allows evaluations with several reports. (I am using version 9.0.2 of the Ultimate Edition.)

+56
Jun 24 '10 at 22:40
source share

Same as @Noel, but some details. First of all, Expression Evaluation ( ALT + F8 ) can only be enabled in debug mode .

enter image description here

enter image description here

+45
Sep 09 '13 at 15:41
source share

IntelliJ IDEA 13 Community Edition, Windows:

  • Go into Debug mode and run the application
  • Go to Express expression :

    enter image description here

    or right-click in the editor area:

    enter image description here

  • Go to Code Snippet Mode enter image description here

  • Enter your application and click Rate enter image description here

+14
Nov 04 '14 at 13:52
source share

You can write the code in alt-f8 .. but you should only do this 1 line at a time. If you make a refund, your code will return when you click next (I think). This is not perfect, though ...

+7
Jun 24 '10 at 18:39
source share

For those who are looking for this in 2019: I tried to do this in IntelliJ IDEA 2019.1 (Ultimate Edition), but could not find the code snippet mode button in the expression evaluation dialog.

As documented here : now these are two tiny arrows pointing diagonally at the end of an expression field.

enter image description here

+1
Apr 16 '19 at 16:57
source share



All Articles