• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

NetDebug.trace( ) Method > NetDebug.trace( ) Method

Name

NetDebug.trace( ) Method

Synopsis

NetDebug.trace(string_or_object)

Arguments

string_or_object

Any string or ActionScript object that is serializable as a string.

Description

The trace( ) method is used during debugging to display a string, object, or other value in the NetConnection Debugger panel. This is useful during debugging for determining where a particular problem might be occurring.

The NetDebug.as file must be included in order to use the trace( ) method, and the NetConnection Debugger panel must be open as well.

Example

The following code shows the basic syntax of the trace( ) 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( );
  NetDebug.trace("URL established");
  var my_service = my_conn.getService("com.oreilly.frdg.searchProducts");
  NetDebug.trace("Service object created");
}

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint