MicroStrategy ONE

Debugging Using URL Parameters

Before reading this, please read Debugging Using Transform Parameters.

Special parameters can be added to the URL to automatically set the debugFlags parameter value for whatever transform is used to render a given request.

Parameter Value Flag set

EnumWebParameters.WebParameterXml

xml

DebugFlagBeanXml (1)

EnumWebParameters.WebParameterDebugUser

debug

Defined on the value of the request

Thus, if you include the URL parameter xml=1, all WebBean XML is included in the rendered HTML source. If you further include debug= 65535, you get complete debug information.

The xml must always be set equal to 1. The debug parameter can be set to any value available in the EnumWebAppDebugFlags enumeration. The value must entered either as an integer or a hexadecimal (starting with 0x) value. Additionally, values can be combined such as xml=1&debug=0x1000. The values are set as flagged values, that is the union (‘or’) of all flags are taken.

The parameter xml is available only for compatibility with previous releases of MicroStrategy Web products. However, a better option is to use the debug parameter since it provides a variety of options for your use. The debug parameter can be set to any value available in the EnumWebAppDebugFlags enumeration.

EnumWebAppDebugFlags

The following are some of values of the enumeration:

Name Description Value (Decimal/Hexadecimal)

DebugFlagNone

Removes all debug info from the HTML page

0 / 0x0000

DebugFlagBeanXml

Shows the bean's XML

1 / 0x0001

DebugFlagBeanState

Shows the bean's maximal state

2 / 0x0002

DebugFlagBeanAll

Includes all the bean's information

DebugFlagBeanXml + DebugFlagBeanState

DebugFlagTransformParameters

Include the values of all the FormalParameters of the Transform

256 / 0x0100

DebugFlagAppRequestKeys

Includes the values in the RequestKeys

4096 / 0x1000

DebugFlagAppBrowserSettings

Includes the values in the BrowserSettings

8192 / 0x2000

DebugFlagAppAll

Includes all the values of application objects

DebugFlagAppRequestKeys + DebugFlagAppBrowserSettings

DebugFlagAll

Includes all Debug flags

65535 / 0xffff

Usage

The debug parameter can simply be added at the end of a URL using the values shown in the above table. Adding the debug=0xffff parameter to the URL generates XML API logs at the bottom of the HTML which can be viewed from the browsers' View Source option.

The following URL adds the state of the bean to the HTML source: http://WebServer/MicroStrategy/servlet/mstrWeb?evt=3054&...&debug=0x0002.

Once the MicroStrategy Web page is loaded, the debug information can be located as part of the HTML source page. This information is stored as an XML node inside an HTML comment tag. For example: 

   <!--

   <debug>

      <bean name="folderTb" …>

         <xml>

         …

         </xml>

         <state></state>

      </bean>

      <transform>

         <parameters>

           <parameter name=”” type=”” value=”” defaultValue=”” />

            …

         <parameters>

      </transform>

      <application >

         <request-keys class="com.microstrategy.web.app.StringRequestKeys" >

            <key name="[name]" value="[value]" />

            …

         </request-keys>

         <browser-settings class="com.microstrategy.web.app.HttpBrowserSettings" >

            …

         </browser-settings>

      </application>

   </debug>

   -->

Once a debug parameter has been set, subsequent requests to different MicroStrategy Web pages also have the debug parameter enabled so you do not need to add it to every page. The debug parameters should be turned off once the testing process has been finished as the size of the HTML increases and performance of the application may be affected.

Accessing inline frames (iframes)

When using customizing transforms, you may want to analyze the generated HTML to make sure that the transform is correctly rendered. If the MicroStrategy Web page on which the data is displayed uses inline frames (iframes), you need to add the showIframe parameter to the URL. When inline frames are used, only portions of an HTML page are updated when performing a manipulation. Thus, it is not possible to extract debugging information from the original HTML source since the iframe that contains the new HTML is hidden by default.

To make the iframe visible, add the showIframe parameter to the URL and set the value to true. The following example shows how to make an iframe visible: http://WebServer/MicroStrategy/servlet/mstrWeb?evt=2001&...&showIframe=true. This displays a blank rectangular box at the bottom of the browser. Right-click on it, and select "View Source" to see the results of the iframe request.

Restricting access to debugFlags

You can use the debugFlagsMask parameter to limit the debugFlags parameters that are available using the URL. The debugFlagsMask parameter is not available by default. You must manually add it to the mstrWeb servlet in the web.xml file (located in the WEB-INF folder) as shown below. For example, to limit access to bean information only, the debugFlagsMask value should be 0x0003, derived from the value of the DebugFlagBeanXml + DebugFlagBeanState.

<servlet>

    <servlet-name>mstrWeb</servlet-name>

    <display-name>Main Servlet</display-name>

    <servlet-class>com.microstrategy.web.servlets.MainServlet</servlet-class>

    <init-param>

      <param-name>debugFlagsMask</param-name>

      <param-value>0x0003</param-value>

    </init-param>

     …

</servlet>