NetDebugConfig Class

NetDebugConfig ClassFlash 6

contains properties of the current debug settings
myNetDebugConfigObject.methodName(params)
myNetDebugConfigObject.propertyName

Methods

getDebug( )

Returns the current state of debugging.

setDebug( )

Allows you to set the state of debugging.

Properties

app_server

Flash Remoting events that occur on the application server or in the Flash Gateway on the server.

client

Flash Remoting activity from the client.

flashcomm_server/realtime_server

Flash Communication Server MX events.

Description

The NetDebugConfig object is included when you include the NetDebug.as file in your Flash Remoting application. It holds the properties of your current NetConnection debugger configuration and also allows you to turn NetConnection debugging on and off for ActionScript objects. To use the NetDebugConfig object for your specific connection, retrieve it with the NetConnection.getDebugConfig( ) method:

var myConfigObject = myConnection.getDebugConfig( );

You can then call methods on the NetDebugConfig object to turn debugging on and off programmatically and set the status of reporting for individual events. The events are associated with one of the properties of the object (app_server, client, or flashcomm_server/realtime_server), each of which are objects in their own right. Events for which debugging is active are logged in the NetConnection Debugger panel. The full listing of events is shown in Table 15-2.

Table 15-2. NetDebugConfig events of the NetConnection class

Event

Default

Description

app_server.amf

false

Server AMF events

app_server.amfheaders

false

AMF headers from the Flash Remoting gateway

app_server.coldfusion

true

ColdFusion debug events if ColdFusion Server debug mode is on

app_server.error

true

Any error that occurs on the server

app_server.httpheaders

false

HTTP headers from the server

app_server.recordset

true

Events from pageable recordsets

app_server.trace

true

Trace events on the server

client.http

true

Client-initiated HTTP events such as connections and service calls

client.recordset

true

Pageable recordset events

client.rtmp

true

Flash Communication Server client events which use Real Time Messaging Protocol (RTMP); not used by Flash Remoting

client.trace

true

Client NetConnection.trace( ) events

flashcomm_server.tracerealtime_server.trace

true

Flash Communication Server trace events

To retrieve individual settings of the NetDebugConfig object, use dot notation to address the event type and the event. Remember to retrieve the object using NetConnection.getDebugConfig( ) first:

debugConfigObj = my_conn.getDebugConfig( )
trace(debugConfigObj.client.http);

The preceding code displays true in the Output window if the client.http debug setting is turned on. To turn it off, simply set the property to false:

debugConfigObj.client.http = false;

You can disable all debugging to the NetConnection debugger for the specified object using:

debugConfigObj.setDebug(false);

For more information on the NetConnection debugger and the NetDebugConfig object see:

http://livedocs.macromedia.com/frdocs/Using_Flash_Remoting_MX/DebugActionScript.jsp

See Also

NetConnection.getDebugConfig( ), the NetDebug object; Chapter 13



    Part III: Advanced Flash Remoting
     
    ASPTreeView.com
     
    Evaluation has єГШєТФАѕСexpired.
    Info...