Trace (xbtrace.exe)

Starts and stops detailed tracing on a console.

Xbtrace provides the subcommands and functions described in the following table.

Command Description
xbtrace start netcap Starts a network trace capture.
xbtrace stop Stops and saves a trace.
xbtrace log Collects a log during an event tracing session on the remote console.

Starting a network trace capture

xbtrace start tracetype [/X[:]address[+<accesskey>]]
Option Description
start Starts a network trace capture. If a trace is already in progress, xbtrace displays a message to that effect and continues to capture trace data.
tracetype Specifies the trace type to start. Trace types include:
Trace type Description
advancedmpAdvanced multiplayer capture. This trace type allows developers to take an advanced multiplayer trace. These traces contain information needed to debug issues in multiplayer sessions. Advanced multiplayer trace sessions will automatically collect a network state log when start and stop are executed. When stop is called, all trace files and network state logs will be copied to the PC in a trace session directory. Additional network state logs can be collected during advanced multiplayer trace sessions using the log netstate command. To capture the current state of a multiplayer session you perform the following steps:
  1. Start a trace with xbTrace start advancedmp
  2. Take a snap of the current session at various points of interest using log netstate
  3. Stop the trace with xbtrace stop
netcapNetwork packet capture.
xboxliveservicesThis tracetype is used to take a trace that can be used to analyze a title's use of Live Services. Your title must be running to start and stop a capture. When stop is called, trace files are placed in a directory on the PC whose name includes "xbtrace" and a timestamp. Contact your DAM for information on analyzing the trace files. The resulting trace file can be analyzed with a tool called Xbox Live Trace Analyzer (XBLTraceAnalyzer.exe) which can be found as part of the Xbox Live Tools package from https://aka.ms/xboxliveuwptools.
/X[:]address[+<accesskey>]Specifies the host name or address (shown as Tools IP on the console) of a targeted console, but does not change the default console. For information about setting a host name for a console, see Setting a Hostname for the Console IP Address.If you do not use this option, the default console (previously set by Connect (xbconnect.exe)) is used.Accesskey is a string that you can use to restrict access to a console to only those people who know the access key. Set the access key by using the command xbconfig accesskey=your-key; then, restart your console to make the access key effective. To access a console that is configured with an access key, you must include a plus sign (+) and the access key after the IP address or host name of the console. For more information about access keys, see xbconfig accesskey.
Note
If an access key is provided when the default console is set by xbconnect, then the access key is stored as part of the address of the default console.

Stopping and saving a network trace capture

xbtrace [stop [etlfile] ] [/X[:]address[+<accesskey>]]
Option Description
stop [etlfile]Stops and saves the currently running network trace.etlfile is an optional file name (with optional path) for the saved trace data. If you do not specify a file name, then the captured data is saved in a file named xbtrace.etl, in the current directory. If you specify a file name without a path, then file saved under the given name in the current directory. If the file you specify already exists, xbtrace displays a message to that effect and continues to capture trace data. At this time, there is no option to force the file to be overwritten.
/X[:]address[+<accesskey>]Specifies the host name or address (shown as Tools IP on the console) of a targeted console, but does not change the default console. For information about setting a host name for a console, see Setting a Hostname for the Console IP Address.If you do not use this option, the default console (previously set by Connect (xbconnect.exe)) is used.Accesskey is a string that you can use to restrict access to a console to only those people who know the access key. Set the access key by using the command xbconfig accesskey=your-key; then, restart your console to make the access key effective. To access a console that is configured with an access key, you must include a plus sign (+) and the access key after the IP address or host name of the console. For more information about access keys, see xbconfig accesskey.
Note
If an access key is provided when the default console is set by xbconnect, then the access key is stored as part of the address of the default console.

Collecting a log during an event tracing session on the remote console

xbtrace loglogtype [/X[:]address[+<accesskey>]]
Option Description
logCollects a log during an event tracing session on the remote console.
logtypeSpecifies the log type to collect. Log types include:
Log type Description
netstateNetwork state.
The resulting trace files are placed in a directory on the PC whose name includes "xbtrace" and a timestamp.
/X[:]address[+<accesskey>]Specifies the host name or address (shown as Tools IP on the console) of a targeted console, but does not change the default console. For information about setting a host name for a console, see Setting a Hostname for the Console IP Address.If you do not use this option, the default console (previously set by Connect (xbconnect.exe)) is used.Accesskey is a string that you can use to restrict access to a console to only those people who know the access key. Set the access key by using the command xbconfig accesskey=your-key; then, restart your console to make the access key effective. To access a console that is configured with an access key, you must include a plus sign (+) and the access key after the IP address or host name of the console. For more information about access keys, see xbconfig accesskey.
Note
If an access key is provided when the default console is set by xbconnect, then the access key is stored as part of the address of the default console.

Remarks

For further information about capturing a network trace, see Network capture.

xbtrace start netcap
xbtrace start advancedmp
xbtrace stop
xbtrace stop c:\netcaptemp\netcap.etl
xbtrace stop c:\advancedmptemp
xbtrace log netstate  

See also

Command Line Tools

XTF Transport Errors

Connect (xbconnect.exe)