IntelliJ IDEA 2019.2 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.

Assign a label

  1. Select a watch in the list

  2. Press F11 or select Mark Object from the context menu. The Select object label dialog opens.

  3. Specify the label name. Use alphanumeric characters without spaces. Optionally, click Browse the Browse button next to the preview to change the label color.

  4. Click OK to assign the label.

Remove a label

  • Select the item in the list and press F11.

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

Last modified: 17 October 2019