GoLand 2019.2 Help

Adding, editing and removing watches

If you want to evaluate a number of variables or expressions in the context of the current frame, and view all of them simultaneously, you can create watches for them. The values of the expressions are updated with each step through the application, but are only visible when the application is suspended.

Open the Watches pane

By default, the Watches pane is hidden and the watches are shown in the Variables pane.

  • To have the Watches pane displayed separately and view the configured watches in it, release the Show watches in Variables tab toggle button on the toolbar of the Variables pane. By default, the button is pressed.

  • To hide the Watches pane and view the watches in the Variables pane, press the Show watches in Variables tab toggle button on the toolbar of the Watches pane.

Open the Watches pane

Create a watch

To create a watch, use one of the following actions:

  • In the Watches pane, click the New Watch button New Watch or press Insert.

  • Select one or several items in the Variables pane and drag them to the Watches pane.

  • Right-click an item in the editor and select Add to Watches.

  • In the Variables pane, or in the Inspection window, or in the Evaluate Expression dialog, right-click the desired item and select Add to Watches.

  • To navigate from a backtrace in the Watches pane to the corresponding line of the source code, right-click the line of backtrace and select Jump to Source from the context menu, or just press F4.

Edit a watch

  • To change the expression represented by a watch, right-click the desired watch and select Edit.

To delete a watch

To delete a watch, use one of the following actions:

  • In the Watches pane, select a watch to be deleted.

  • Right-click the selected watch and select Remove Watch, or press Alt+Delete.

Last modified: 29 October 2019