- 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
Contents
Opening xbWatson
xbWatson can be opened either from a GDK command prompt, from XBOX Manager 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: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)
Loading configuration ‘C:\Users\UserName\AppData\Local\Microsoft\XBOX One Development Kit\xbWatson\3.0\defaultConfig.txt’.
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
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)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
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
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
Available data feeds are shown in the following table.
Rule Editor
The Rule Editor is on the right side of the main output window as shown in figure 6. Figure 6. Rule Editor
To create a rule
- Click New from the left pane. A new blank rule is created.
- Name the rule.
- Add a new condition.
- Match the regular expression: Enter a regex string to be evaluated.
- 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.
- Save the rule.
Be aware of the toggle multi-select button when applying rules from the rule editor. Only the currently selected rules are applied.
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. DashboardLog
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.
- 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.
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 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. Figure 9. Memory and Quiesce hang dumps
