7.3. Developer Support

WAF provides the Developer Support application to give developers high-level information about each server request. Developer Support shows data such as request duration, number of queries, and information about each query executed. In addition, Developer Support allows developers to adjust their server logging level at runtime.

7.3.1. Enabling Developer Support

To enable Developer Support, edit your enterprise.init file and set the following initializer to active:

init com.arsdigita.webdevsupport.Initializer {
  active = true;
}

To disable Developer Support, modify your enterprise.init file and modify the webdevsupport Initializer so that active = false.

Once you have enabled Developer Support in your enterprise.init file, you must restart the servlet container in order to use it. E.g. if you are using Tomcat, service tomcat restart is sufficient.

WarningWarning
 

You should always make sure that Developer Support is disabled in a production system. Developer Support imposes a significant performance penalty on systems as it collects and stores request debugging information.

It is possible to have Developer Support enabled and not running. This still provides a measurable performance hit because it registers a listener. Once enabled in enterprise.init and recognized by the servlet container, you can turn Developer Support on and off via the administrator page. See Section 7.3.2.2 Developer Support Features for more information on controlling Developer Support via the administrator page.

7.3.2. Using Developer Support

7.3.2.1. Accessing Developer Support

To access Developer Support, login as a site-wide administrator and then navigate to /ds/ on your server. For example, if your server is running on your localhost and your Dispatcher Servlet Path is /ccm, then you would access Developer Support at http://localhost/ccm/ds/.

7.3.2.2. Developer Support Features

Once you have accessed Developer Support, you will find an index page listing up to the last 100 requests to the server as well as several options for configuring your server:

Request Information

Developer Support stores information about the last 100 requests to the server, accessible through the index page. For each request, information such as the duration, the number of database operations executed, the requesting IP address, and the URL requested is available. This information is especially useful for performance-tuning. For example, if you are looking for a slow or expensive page in a certain use case, look for a request with an unusually long duration or large number of queries.

Click on a Request URL to find out detailed information about that individual request. The Request Information page provides details such as the amount of time for various stages of the request, and the text and duration of each SQL operation.

Click on a SQL Operation to find detailed information about that specific operation. The Query Information page provides a stack trace showing the code that led to the SQL operation's execution. Also, if the server is running on an appropriately configured Oracle database, the page will provide a link to show the explain plan of the query.

Query Log

On the Developer Support index page, next to each request, is a link to a Query Log. A request's Query Log page presents a text page of all the SQL operations for that request, formatted for easy cut-and-paste into a database client such as SQLPlus or PSQL.

Log4j Logger Adjuster

The Developer Support index page provides a link to a Log4j Logger Adjuster. This Log4j adjuster allows the developer to change the server's logging level at runtime. See also Section 7.5.1 Log4J

Disable Request Logging

The Disable Request Logging link on the Developer Support index page allows you to toggle at runtime whether Developer Support actively stores information about each request. If you disable request logging, Developer Support will clear all previously stored request information as well as stop recording information about new requests.

Show Hits To Developer Support

The Show hits to developer support link on the Developer Support index page toggles the tracking of requests against the Developer Support application itself. As most developers will not be interested in this information, this information is usually left hidden.