PyCharm 4.0.0 Web Help

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. Unlike the Expression Evaluation feature, these expressions are persisted as the part of your project.

This section describes how to add items to watches, change and remove watches.

To add an item to a watch

Do one of the following:

  • In the Watches pane, click add, or just press InsertInsertInsertInsertInsertInsertInsertInsertShift BackspaceInsertShift Backspace.
  • On the Variables pane, in the Inspection window, or in the Evaluate Expression dialog box, right-click the desired item and choose Add to Watches on the context menu.
  • Select the desired item in the Variables pane and drag it to the Watches pane.
  • Select item in the editor, right-click it and select Add to Watches on the context menu.
To edit a watch
  • To change the expression represented by a watch, right-click the desired watch and select Edit on the context menu.
To remove a watch
  1. In the Watches pane, select a watch to be deleted.
  2. On the context menu, choose Remove Watch, or press Alt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+DeleteAlt+Delete⌘ Delete⌘ Delete⌘ Delete.


You can navigate from a backtrace in the Watches pane to the respective line of the source code. To do that, right-click a line of backtrace, and choose Jump to Source on the context menu, or just press F4F4F4F4F4F4F4F12 or Ctrl+Shift+E⌘ Down or F4F4F3.

See Also



Web Resources: