Adds the message you specify to the internal trace buffer. This method is for 4GL JSP Web pages only.
psPage object
psPage.Trace ( string message )
Argument |
Description |
---|---|
message |
Message to be displayed in the internal trace buffer |
None
The Trace method allows you to insert a custom message in the trace buffer for server-side event processing. You must turn tracing on before your message (and the rest of the trace buffer) can be displayed. You can do this by selecting the Enable Trace check box on the Errors page of the Page Properties dialog box or by calling psPage.SetTrace(true) in code that is parsed before your Trace call.
The trace message must be in plain text. It will be indented by the indent amount of the trace buffer and will appear on its own line, with blank spaces preserved. Embedding new lines in the message will disrupt the formatting of the trace. You can increase the indent level of your trace messages by surrounding your Trace method call with (multiple) calls to TraceIndent and TraceOutdent.
This example adds a message to the trace buffer. The message is set off from the other event-processing trace messages by an additional indent space:
psPage.TraceIndent( );
psPage.Trace(MyVar + " is the value of MyVar at this time");
psPage.TraceOutdent( );