NetConnection.getDebugConfig( )

NetConnection.getDebugConfig( ) MethodFlash 6

retrieves an object containing the subscribed debug events
myNetConnectionObject.getDebugConfig( )


A NetDebugConfig object containing the currently subscribed events.


The getDebugConfig( ) method is used to programmatically retrieve the currently subscribed events for the NetConnection Debugger panel.


The following code shows the basic syntax of the getDebugConfig( ) method and how it might be used:

#include ""
#include ""
var my_conn = NetServices.createGatewayConnection( );
var my_service = my_conn.getService("myService", this);
my_conn.trace("Service Object created.");

function onStatus (error) {
  // Show error message
  // Get the NetDebugConfig object
  var debugConfig = my_conn.getDebugConfig( );
  // Iterate through the properties of the NetDebugObject
  for (i in debugConfig) {
    trace (i + ":" + debugConfig[i]);
    // If the property is an object itself, iterate through its properties
    for (j in debugConfig[i]) trace ("   " + j + ":" + debugConfig[i][j]);

In the code, a NetDebugConfig object is created when a service call fails, and the properties of the object are written to the Output window. Note that some of the properties of the NetDebugConfig object are objects themselves, so they will be written to the Output window as [object Object]. The properties give you information about your current debug settings.

See Also

NetConnection.getDebugId( ), NetConnection.setDebugId( ), the NetDebug class, the NetDebugConfig class; Chapter 13

    Part III: Advanced Flash Remoting