> Documentation index: https://developer.chrome.com/docs/devtools/javascript/llms.txt

<br />

> [!WARNING]
> **Warning:** **Warning:** This page is deprecated. See following section for up-to-date information: [Watch the values of custom JavaScript expressions](https://developer.chrome.com/docs/devtools/javascript/reference.md.txt#watch)

Chrome DevTools allows you to easily see multiple variables throughout your application. Watching
variables within Sources keeps you out of the console and focused on improving your code.

The Sources panel provides the ability to watch variables within your application. This is located
in the watch section of the debugger sidebar. By taking advantage of this functionality you will not
need repeatedly log objects to the console.

![Watch section of debugger](https://developer.chrome.com/static/docs/devtools/javascript/watch-variables/image/watch-section-debugger-a977453d709e6.png)

## Adding variables

To add a variable to the watch list use the add icon to the right of the section heading. This will
open an inline input where you provide the variable name to watch. Once it is filled in press your
<kbd>Enter</kbd> key to add it to the list.

![Add to watch list button](https://developer.chrome.com/static/docs/devtools/javascript/watch-variables/image/add-watch-list-button-449f3aa50f969.png)

The watcher will show you the current value of the variable as it is added. If the variable is not
set or can't be found it will show for the value.

![Undefined variable in the watch list](https://developer.chrome.com/static/docs/devtools/javascript/watch-variables/image/undefined-variable-the-w-e7de26891fc4b.png)

## Updating variables

Variable values may change as an application continues to operate. The watch list is not a live view
of the variables unless you are stepping through execution. When you are stepping through execution
using [breakpoints](https://developer.chrome.com/docs/devtools/javascript/breakpoints.md.txt), the watched values will update automatically. To manually recheck the
variables in the list press the refresh button to the right of the section heading.

![Refresh watch variables button](https://developer.chrome.com/static/docs/devtools/javascript/watch-variables/image/refresh-watch-variables-b-a195f54c4c813.png)

As the refresh is requested the current application state is rechecked. Every watched item will be
updated with the current values.

![Updated variable being watched](https://developer.chrome.com/static/docs/devtools/javascript/watch-variables/image/updated-variable-being-wa-29b6928812a3a.png)

## Removing variables

To keep what you are looking at minimal for faster work you may need to remove variables from the
watch list. This can be done by hovering the variable and then clicking the removal icon that
appears to the right.

![Hover variable to remove from watch list](https://developer.chrome.com/static/docs/devtools/javascript/watch-variables/image/hover-variable-remove-w-72a2b8627cab4.png)