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:
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.
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.
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:
The gateway should echo back the headers it received in the incoming message, in an array of objects containing the following keys: