Debugging the pipeline

To configure MCS debugging features you edit the debug and debug-output sections of the mcs-config.xml file.

To configure MCS debugging features you edit the debug and debug-output sections of the mcs-config.xml file.

You can enable comments in your output and send output to the log file by setting the comments and logPageOutput attributes on the debug to 'true'.

<debug
  comments="false"
  logPageOutput="false"/>

The directory for debug output of pipeline events is defined in the debug-output element by setting the value of the directory attribute. It specifies the directory into which debugging pipeline operations will write their output.

<debug-output directory="/pipeline_debug"/>

See Debugging features for further information.

Debugging the pipeline

You can add markup to XDIME pages that will help identify problems with pipeline operations. The pipeline:serialize element cause MCS to list the output from the contained pipeline elements to a file that you can examine to help debug markup.

Setting the value of the active attribute on the element enables or disables output to the debug directory you defined in the MCS configuration file. The default value for the attribute is 'false'. So you can add markup to a document, even in a production environment, with little impact on performance.

Note:

The value of the active attribute also can be a pipeline expression, including template parameters, request parameters, or even device characteristics.

In the fileSuffix attribute you specify the filename and extension that identifies output for a particular test case. For example you might want to associate the output with a server, or a specific MCS project. MCS timestamps the output and adds unique number, and suffixes it with the fileSuffix attribute value. For example, if the debug output directory is '/pipeline/debug/' and the fileSuffix attribute is 'server.xml', then the debug output path will be something like /pipeline_debug/20050518-131253-0015-server.xml

<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/2002/06/xhtml2"
  xmlns:pipeline="http://www.volantis.com/xmlns/marlin-pipeline"
  xmlns:webd="http://www.volantis.com/xmlns/marlin-web-driver">
  <head>
    <title>pipeline:serialize</title>
  </head>
  <body>
    <div>
      <pipeline:serialize active="true" fileSuffix="server.xml">
        <pipeline:transform href="test.xsl">
          <webd:get url="http://weather.yahooapis.com/forecastrss">
            <webd:parameters>
              <webd:parameter name="p" value="USWA0395"/>
              <webd:parameter name="u" value="c"/>
            </webd:parameters>
          </webd:get>
        </pipeline:transform>
      </pipeline:serialize>
    </div>
  </body>
</html>

Logging re-entrant pipeline operations

MCS can detect re-entrant pipeline operations such as webd:get or urid:fetch and log warning messages. A unique identifier is generated for each MCS instance and added to a special header for every pipeline request. If the incoming header contains the identifier of the current instance, a warning message is logged. It is not guaranteed that two MCS instances will not have the same identifier, but the probability is very low.

Related topics