> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# xbWatson

> xbWatson

xbWatson is a tool for using your development PC to monitor system-wide debug output and critical system events coming from an XBOX console. xbWatson has a rules editor, which allows output customization and actions, process monitoring, and control. You can also collect heap, triage, and mini memory dumps.

Overview of features:

* Collect system-wide debug output and critical system events
* Use the rules editor to filter and customize output
* Separate output streams across multiple output tabs
* Save and distribute your customized rules and settings
* Get detailed process monitoring and controls
* Create and manage triage, heap, and mini memory dumps

xbWatson is session-based, meaning that its life cycle is dependent on a connection to a specific console. You can't disconnect an existing session and reconnect it to another console. You can, however, open multiple instances of xbWatson, each connected to a different console. xbWatson is collaborative - meaning there are no exclusive connections, or accidental locking of consoles. Multiple instances can target the same console and will work well together, even from different computers or developers.

## Contents

* [Opening xbWatson](#ID4EBB)
* [Features](#ID4ETB)
* [Memory dumps](#ID4ETC)
* [Game Memory](#game_memory)

<a id="ID4EBB" />

## Opening xbWatson

xbWatson can be opened either from a GDK command prompt, from [XBOX Manager](/tools/tools-console/xbom/xbom) or by searching for xbWatson from the Start menu. xbWatson will connect to your default console unless overridden by providing a test console IP or host name on the command line.

Opening xbWatson from the command line, picking up the default console:

```text theme={null}
C:\Program Files (x86)\Microsoft GDK\bin>xbwatson.exe  
```

Opening xbWatson with IP or host name override:

```text theme={null}
C:\Program Files (x86)\Microsoft GDK\bin>xbwatson.exe /x:consoleIP  
```

Opening xbWatson from [XBOX Manager](/tools/tools-console/xbom/xbom) via the Tools Launcher, which will pick the default console:

<img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_launcher.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=c4e6659e51a910b853fce42deb9ad89a" alt="xbWatson" width="298" height="234" data-path="images/gdk/tools/xbwatson_launcher.png" />

Opening xbWatson from [XBOX Manager](/tools/tools-console/xbom/xbom) via right clicking a console and selecting Launch xbWatson, which will use the selected console:

<img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_xbom.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=73b6b415bac18f2225c5008d54d1605d" alt="xbWatson" width="293" height="485" data-path="images/gdk/tools/xbwatson_xbom.png" />

### Configuration Overrides

On startup, xbWatson loads a default configuration file named defaultconfig.txt located at %localappdata%\Microsoft\XBOX One Development Kit\xbWatson\3.0. This file saves the state of output tabs, their configuration, the rules, and applied rules. This file can be shared to other GDK users so they can quickly open an xbWatson session with custom settings. You can load a shared config by doing the following:

* Saving over the local defaultconfig.txt file.
* From Windows, drag and drop a sharedconfig.txt file over xbWatson.exe.
* Open xbWatson.exe with a command-line switch pointing at the saved config file (i.e. xbwatson.exe E:\MyConfig\sharedconfig.txt)

To determine the currently loaded config file location, please observe the Log tab in the Dashboard for what it is loading: <code>Loading configuration 'C:\Users\UserName\AppData\Local\Microsoft\XBOX One Development Kit\xbWatson\3.0\defaultConfig.txt'.</code>

<a id="ID4ETB" />

## Features

xbWatson has features that allow for seeing and configuring output in the main output window, apply output rules via the editor and menu, filtering the type of output via data feeds menu and managing advanced capabilities in the Dashboard around Log diagnostics, Game OS process list and Stack dump generation and management.

### Main output window

The main output window consists of the title bar, output tabs, Rule Editor, and the dashboard as shown in figure 1.

**Figure 1.  xbWatson** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_connected.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=e34e40cdc10e0d86630f7ad4f2dddd45" alt="xbWatson" width="944" height="520" data-path="images/gdk/tools/xbwatson_connected.png" />

### Title bar

When xbWatson is connected to a console, the title bar is green with the connection details as shown in figure 2.

**Figure 2.  Title bar (connected)** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_titlebar.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=b0dcab289f41df95697f75eb3d84b7b4" alt="Title bar" width="937" height="23" data-path="images/gdk/tools/xbwatson_titlebar.png" />

If xbWatson can't connect, or if Development Kit services aren't available, the title bar is red or yellow. Check the Log tab in the Dashboard to get additional error information if you get into this state. Often this is caused by an invalid IP address or dev kit hostname. Confirm your dev kit IP address and hostname are valid to ensure xbWatson can connect to your dev kit properly.

### Output tabs

At startup, there's one default output tab. You can create more output tabs by clicking the plus sign (+) to the right of the last tab. You can remove an output tab by clicking the x on the right side of that tab. You can rename the tab by clicking the name (Output). When there is debug spew flowing from the console, the activity light for that tab flashes. Data can be copied from the output window by highlighting or selecting text and using standard Windows copy commands to move it to and from the clipboard buffer. Within each output tab, you have the following option menus to configure that tab.

#### Add/Remove Rules menu

Use the Add/Remove Rules menu to turn a rule on or off for the current output tab as shown in figure 3. For more information about creating rules, see the Rules Editor section later in this topic.

**Figure 3.  Add/Remove Rules menu** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_applyrules.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=d512e8d129a6f1bda7fdf02358d1e3b0" alt="Add/Remove Rules menu" width="324" height="408" data-path="images/gdk/tools/xbwatson_applyrules.png" />

#### Data feeds menu

Use the Data feeds menu to configure the output streams that are shown by the current output tab as shown in figure 4.

**Figure 4.  Data feeds menu** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_datafeeds.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=062d7fb7088ac20276ce3e8bd81366ed" alt="Data feeds menu" width="326" height="410" data-path="images/gdk/tools/xbwatson_datafeeds.png" />

Output streams can be turned on or off by selecting or clearing their check boxes next to the stream name. Individual options within that stream can be configured by clicking the gear icon to the right of the stream name as shown in figure 5.

**Figure 5.  Feed control** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_feedcontrol.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=d24cd66fbe724b07962ae47ca31ab2c7" alt="Feed control" width="326" height="410" data-path="images/gdk/tools/xbwatson_feedcontrol.png" />

Available data feeds are shown in the following table.

| Data feed           | Description                                                                                                                |
| ------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| Output debug string | Debug output from both the recovery OS and the game OS.                                                                    |
| Process feed        | Process change output from game OS.                                                                                        |
| Process debug feed  | Debug event output from a selected process. The output is available after monitoring a process from the Game OS dashboard. |
| Console event feed  | Output from a curated list of Windows and telemetry events (currently focused on app registration and activation).         |
| Game memory feed    | Output that indicates the amount of title and tooling memory currently in-use and available on the console.                |

### Rule Editor

The Rule Editor is on the right side of the main output window as shown in figure 6.

**Figure 6.  Rule Editor** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_ruleeditor.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=53e171afd9072bd07f41b05f908b33cd" alt="Rule Editor" width="936" height="484" data-path="images/gdk/tools/xbwatson_ruleeditor.png" />

To create a rule

1. Click **New** from the left pane. A new blank rule is created.
2. Name the rule.
3. Add a new condition.
   * Match the regular expression: Enter a regex string to be evaluated.
4. Add an action (to be taken after successfully matching the condition):
   * **Change color**: opens a color picker to change the matched text.
   * **Acquire stack dump**: triggers the selected stack dump type.
   * **Include text**: displays only the text.
   * **Exclude text**: doesn't display the text.
   * **Disable this rule**: stops running this rule. This is useful to allow you to grab a stack dump one time during an automated test run.
   * **Set trigger to break**: suspends the process and prepares for a debugger attach.
   * **Invasively attach**: attaches xbWatson as a debugger to the process.
   * **Remove invasive attach**: removes xbWatson as a debugger.
   * **Flash window**: flashes the xbWatson icon in the taskbar.
   * **Show banner message**: shows a banner message at the top of the output window and turns the activity light for that tab to red to catch your attention.
   * **Clear banner message**: removes the banner message at the top of the output window.
   * **Enable other rule**: enables the specified rule for this output tab.
   * **Disable other rule**: disables the specific rule for this output tab.
5. Save the rule.

Before the rule is active, you must apply it to an output tab. You can do this by clicking **Apply rules** from within the rule editor, or you can close the rule editor and apply the rule through the **Apply rules** menu directly on the output tab.

<Note>
  Be aware of the **toggle multi-select** button when applying rules from the rule editor. Only the currently selected rules are applied.
</Note>

### Dashboard

Clicking the up arrow at the bottom of the main output window opens the dashboard as shown in figure 7. With the dashboard minimized, there are dashboard status lights in the lower-left corner of the window. These status lights correspond to the dashboard items. They blink or change color to indicate data flow or a status change.

**Figure 7.  Dashboard** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_dashboard.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=7a7a5aa54626efcdb21552aa47d04321" alt="Dashboard" width="939" height="33" data-path="images/gdk/tools/xbwatson_dashboard.png" />

#### Log

The log contains information related to xbWatson itself, and xbWatson's connection to the dev kit. You can see what configuration file was loaded at startup, what IP address or saved connection string is being contacted, and other debug information about xbWatson. This dashboard item turns red if there's a problem connecting with the dev kit.

#### Game OS

When a title isn't running on the dev kit, this dashboard item displays yellow and shows that process data is unavailable. Without a title running, you can see a minimum set of data about the dev kit settings.

When a title is running, you can see extended data similar to Windows Task Manager. The color of the row indicates status as follows and as shown in figure 8.

* Green: A change has occurred in the process data in the last five seconds.
* Red: The process has ended.
* Orange: The process is suspended, which includes debug (break).
* Blue: A debugger is attached, including xbWatson as an invasive attach.

Selecting a row allows you to activate the options below the process list.

**Figure 8.  Game OS Process List** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_processlist.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=3a730de125f2ad3e4ab5be6e5ce3bf98" alt="Game OS Process List" width="936" height="328" data-path="images/gdk/tools/xbwatson_processlist.png" />

* Terminate: Clicking an active process and then clicking the Terminate button ends the process.
* Break (debug): This suspends the process and prepares for a debugger to attach.
* Resume: This removes the debug break and resumes the process.
* Monitor: Attaches xbWatson as an invasive debugger. Only one invasive debugger is allowed to attach to a process at a time, so connecting xbWatson in this manner prevents Visual Studio from connecting to the process. Multiple xbWatson instances share this attachment. Detach is automatic if all instances of xbWatson are closed. Once enabled, the process debug data feed (available from the configure output stream UI) begins to receive data. The output debug string goes through the process debug stream after it's attached.
* Detach: Removes xbWatson as an invasive debugger.

<a id="ID4ETC" />

#### Memory dumps

Use the Memory Dump menu to generate a memory dump or to access quiesce hang dumps.

Heap, mini, or triage memory dumps can be created for the title that's currently running on the console. The generated dumps are stored locally on the console and can be downloaded via the **Download** button located under the **Manual Memory Dumps** table.

The **Generate** button is only available if a title is running and is capable of generating memory dumps in this way. xbWatson targets the running game (process Id) that matches a game image name that's registered on the console.

The Memory Dump panel will only allow for memory dump management when the title is running. Both the generate and download operations cause the dashboard busy light to flash, indicating activity.

Quiesce hang dumps are created automatically if a suspend timeout occurs and no degugger is attached.  These dumps are useful for determining why your title's suspend handler didn't complete within the required time.  The dashboard light flashes to indicate the availability of a quiesce hang dump.  The available hang dumps are listed in the **Quiesce Memory Dumps** table.  Use the **Download** button underneath the table to copy a quiesce hang dump to your development PC.  See [Debugging transitions between Game Lifecycle states](/tools/tools-console/visualstudio/debugging-with-visualstudio) for a complete description of the features provided in the Microsoft Game Development Kit (GDK) for debugging the suspend and resume handlers needed for [Game Lifecycle support](/build/console-features/console-workflows/xbox-game-life-cycle).

**Figure 9.  Memory and Quiesce hang dumps** <img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_crashdump.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=f98a3922549577ee26a8704b46487d57" alt="Stack dumps" width="1427" height="782" data-path="images/gdk/tools/xbwatson_crashdump.png" />

<a id="game_memory" />

#### Game memory

Presents a Task Manager-like view of the state of the console that xbWatson is connected to.

The Game Memory dashboard is currently focused on title and tooling memory consumption.  Other statistics, such as CPU or file io statistics, will be added in future releases.

<img src="https://mintcdn.com/microsoft-4404708b/5IpvKlT-jmAaVkeY/images/gdk/tools/xbwatson_system_monitor.png?fit=max&auto=format&n=5IpvKlT-jmAaVkeY&q=85&s=d04b22f345d028baa16df1a7014e9a12" alt="The Game Memory dashboard in xbWatson" width="1417" height="783" data-path="images/gdk/tools/xbwatson_system_monitor.png" />

See [XBOX System Monitor](/tools/tools-console/visualstudio/xbox-system-monitor) for a description of the graphs provided on this dashboard.

## See also

[XBOX console game development (environment and tools)](/tools/tools-console/gc-tools-console-toc) [Retrieving crash dumps](/build/console-features/debugging-diagnostics/retrieving-crash-dumps)


## Related topics

- [xbWatson debug-output monitor for XBOX](/tools/tools-console/xbWatson/index.md)
- [XBOX console developer tools (GDK)](/tools/tools-console/index.md)
- [GDK glossary of terms and acronyms](/home/glossary.md)
- [XBOX Manager](/tools/tools-console/xbom/xbom.md)
- [XBOX System Monitor](/tools/tools-console/visualstudio/xbox-system-monitor.md)
