# XDebug Plugin¶

The XDebug plugin allows HTTP clients to debug the operation of the Traffic Server cache using the default X-Debug header. The plugin is triggered by the presence of the X-Debug or the configured header in the client request. The contents of this header should be the names of the debug headers that are desired in the response. The XDebug plugin will remove the X-Debug header from the client request and inject the desired headers into the client response.

XDebug is a global plugin. It is installed by adding it to the plugin.config file. It currently takes a single, optional configuration option, --header. E.g.

This overrides the default X-Debug header name.

The XDebug plugin is able to generate the following debugging headers:

Via
If the Via header is requested, the XDebug plugin sets the proxy.config.http.insert_response_via_str configuration variable to 3 for the request.
Diags
If the Diags header is requested, the XDebug plugin enables the transaction specific diagnostics for the transaction. This also requires that proxy.config.diags.debug.enabled is set to 1.
If the log-headers is requested while proxy.config.diags.debug.tags is set to xdebug.headers and proxy.config.diags.debug.enabled is set to 1, then all client and server, request and response headers are logged. Also, the X-Debug: log-headers header is always added to the upstream request.
X-Cache-Key
The X-Cache-Key header contains the URL that identifies the HTTP object in the Traffic Server cache. This header is particularly useful if a custom cache key is being used.
X-Cache

The X-Cache header contains the results of any cache lookup.

Value Description
none No cache lookup was attempted.
The cache generation ID for this transaction, as specified by the proxy.config.http.cache.generation configuration variable.
The X-Milestones header contains detailed information about how long the transaction took to traverse portions of the HTTP state machine. The timing information is obtained from the TSHttpTxnMilestoneGet() API. Each milestone value is a fractional number of seconds since the beginning of the transaction.