32

Under Eclipse I can inspect expressions/variables in debug mode with Ctrl+Shift+I. In IntelliJ IDEA (Community Edition), I can add expressions/variables to the watches, but on the next debug they are lost.

Is there any way to inspect variables and expressions on the fly when I'm debugging?

leonheess
  • 16,068
  • 14
  • 77
  • 112
cupakob
  • 8,411
  • 24
  • 67
  • 76

5 Answers5

44

Quick evaluate expression with Ctrl + Alt + F8 (or on a Mac: Cmd + Opt + F8) gives me exactly what I want.

Stefan Haberl
  • 9,812
  • 7
  • 72
  • 81
cupakob
  • 8,411
  • 24
  • 67
  • 76
  • 8
    Note that this shortcut key might conflict with an Intel graphics card shortcut for resetting graphics properties (resolution, monitors etc.) If it does, please see [this answer](https://stackoverflow.com/questions/35108927/ctrl-alt-f8-disconnects-displays#35109007) for how to disable it. – Steve Chambers Apr 09 '18 at 15:23
10

Do you mean "Evaluate expression" action Alt + F8?

Many more useful shortcuts are in Intellij Reference Card.

Vic
  • 21,473
  • 11
  • 76
  • 97
  • 3
    not exactly, with Alt + F8 i must execute the evaluation. But i still have a solution - "Quick evaluate expression" with Ctrl + Alt + F8. – cupakob Aug 06 '13 at 10:33
5

Ctrl + Alt + F8 will work. This shortcut may trigger the Intel HD Graphics hotkey for resetting display settings.

Alt + Left Mouse Key will also work.

If you want to view/edit the shortcuts, you can go to Settings (Ctrl + Alt + S) -> Keymap and search for Quick Evaluate Expression

0

Ctrl + Alt + 8 in case of Intellij Idea 2019.2 and Ubuntu 18.04.

Vinit Solanki
  • 1,863
  • 2
  • 15
  • 29
0

In mac, alt+clicking variables help !

Jibin TJ
  • 416
  • 1
  • 4
  • 15