Name

NetDebugConfig.getDebug( ) Method

Synopsis

                     myConnection.getDebugConfig(id).getDebug( )

Returns

A Boolean indicating the current state of debugging in the Flash Remoting application.

Description

The getDebug( ) method returns the current state of debugging in Flash Remoting. Debugging can be on or off and can be set programmatically with the setDebug( ) method. When debugging is on, the NetConnection debugger receives events and logs messages. When debugging is off, the NetConnection debugger is inactive.

The NetDebug.as file must be included in order to use the getDebug( ) method.

Example

The following code shows the basic syntax of the getDebug( ) method:

#include "NetServices.as"
#include "NetDebug.as"

if (connected == null) {
  connected = true;
  NetServices.setDefaultGatewayUrl("http://127.0.0.1/flashservices/gateway");
  var my_conn = NetServices.createGatewayConnection( );
  var my_service = my_conn.getService("com.oreilly.frdg.searchProducts");
  trace(my_conn.getDebugConfig( ).getDebug( ));
}

The trace( ) statement displays the current state of debugging in this particular application, which should be on because it has not been turned off in the code.

Bugs

At the time of this writing, this method returns `undefined’ in all cases. It has been removed from Macromedia’s online documentation at http://livedocs.macromedia.com/flashremoting/mx/Using_Flash_Remoting_MX/asDict4.htm#91933 and should be considered unsupported until Macromedia updates their documentation.

See Also

The NetDebug object, ...

Get Flash Remoting: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.