SetTrace

Description

Turns tracing for event processing on or off. Turning tracing on also enables you to include your own messages by calling the Trace method. This method is for use with JSP 4GL targets only.

Applies to

psPage object

Syntax

psPage.SetTrace ( boolean bTraceOn )

Argument

Description

bTraceOn

Generates a trace message if true

Returns

None

Usage

Tracing code for server-side event processing makes it easier to track down a problem. By programmatically setting SetTrace to true, or by selecting the Enable Trace check box on the Errors page of the Page Properties dialog box, you can see the details of server-side event processing at the top of your Web page.

To include your own messages in the trace, call the psPage.Trace method in event scripts. To offset your custom trace message, surround it with TraceIndent and TraceOutdent calls.

Tracing cannot be used in the AfterGenerate and RequestFinish events, because the trace would already have been generated at the top of the page. If there are any embedded new lines or carriage returns in the trace text, they will be turned into \n or \r as required. This preserves the indenting of the tracing.

Examples

Example 1

This example turns tracing on from a server-side event:

psPage.SetTrace (true);

See also