You are here: Recent News » Documentation Pages List » AMF - ActionScript Message Format » envelopes » Remoting envelope » Debug information

 

Debug information

A client can request debug information from the server using the amf_server_debug header. The NetConnection debugger is responsible for generating the appropriate headers. The amf_server_debug data field contains an object containing one or several of the following keys, each either set to true or false:

  • amf
  • amfheaders
  • coldfusion
  • error
  • httpheaders
  • recordset
  • trace

The server can choose to observe the client’s request or observe its own rules as to when the debug information should be sent. The NetConnection debugger has a bug where even if a box is checked under the filters tab it may not send the headers unless the checkbox is specifically unclicked then clicked again. This can be confusing to inexperienced users. While this is acceptable behaviour for seldom used events such as httpHeaders, users expect remote tracing regardless of whether they click on a checkbox or not. Therefore the recommended practice is to ignore the client’s request regarding trace headers and always send them anyway unless they are disabled on the server-side. Other debugging information should also be allowed to be disabled on the server-side for security. In deployment environments, debug information may provide sensitive information such as server paths that can be used maliciously.

Keys

trace

Trace should be the very first debugging key implemented in Remoting implementation. It sends back developer-initiated traces from the server-side. These can then show up in the NetConnection debugger. They are equivalent to a server-side NetDebug.trace statement. Only one trace key can be sent back in the debug body. Therefore multiple traces should be put added as elements of an array. The gateway may wish to send only the string the used sent, or it can send more complicated info depending on language capabilities, such as calling service, calling method, line number, date and time of call, etc.

amf

The amf header should echo back the method calls that were sent to the gateway. In particular, for each incoming body, the gateway should add to an array of method calls the following keys:

  • EventType: “AmfMethodCall”
  • Time: A timestamp
  • Source: “Server”
  • TargetURI: The target method
  • ResponseURI: The target response URI (/xx/onResult usually)
  • Type: The type of the response (array, string, etc.)
  • ClassPath: The classpath part of the targetURI
  • ClassName: The class name part of the targetURI
  • MethodName: The method name part of the targetURI
  • Parameters: The arguments sent to the method

amfheaders

The gateway should echo back the headers it received in the incoming message, in an array of objects containing the following keys:

  • EventType: AmfRequestHeaders
  • MustUnderstand: The value of the mustUnderstand flag
  • Date: The date
  • Time: The local server time
  • Source: “Server”
  • AmfHeader: object containing the key “headerName” with the value “headerData”

documentation/amf/envelopes/remoting/debuginfo.txt · Last modified: 2007/02/20 05:00 by niko