Search code examples
javaintellij-idea

How can I tell the type of a local variable in IntelliJ's debugger?


// from Selikoff and Boyarsky Java 17 certification
public class Ex0 {
    public static void main(String[] args) {
        short x = 10;
        short y = 3;
        var z = x * y;
    }
}

I want to tell what the type of the var is but I do not see it in the debugger.

Even the types of x and y are not shown.

ide


Solution

  • You can right click on IntelliJ's debugger tool window, select "Customize Data Views", and enable "Declared type".

    show declared type