IntelliJ IDEA 2019.1 Help

Setting Labels to Variables, Objects and Watches

You can add your own label to a variable, object, or watch and then reference it as if it were a local variable <label-name>_DebugLabel defined in the same context where the expression is evaluated. IntelliJ IDEA also displays these labels in suggestion lists for code completion in the Evaluate Expression dialog.

To set a label

  1. Select the desired watch in the list

  2. Select Mark Object on the context menu or press F11. The Select object label dialog opens.

  3. Specify the label name.

  4. Click Browse browseButton.png to change the label color. Click OK when ready.

To remove a label

  • Right-click the item and select Unmark Object on the context menu

  • Select the item in the list and press F11.

Last modified: 20 June 2019

See Also