Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Using Trace Methods

WOApplication provides trace methods that log different kinds of information about your running application. These methods are useful if you want to see all or part of the call stack. The following table describes the trace methods:
Method Description
- trace: Enables all tracing.
- traceAssignments: Logs information about all assignment statements.
- traceStatements: Logs information about all statements.
- traceScriptedMessages: Logs information when an application enters and exits a scripted method.
- traceObjectiveCMessages: Logs information about all Objective-C methods invocations.

The output from the trace methods appears in Project Builder's launch panel.

You use the trace methods wherever you want to turn on tracing. Usually, you do this in the init method (or constructor) of a component or the application:

// Objective-C
- init {
[super init];
[[self application] traceAssignments:YES];
[[self application] traceScriptedMessages:YES];
return self;
}

// Java
public Main() {
super();
this.application.traceAssignments(true);
this.application.traceScriptedMessages(true);
.
.
.
}

Table of Contents Next Section