Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next
 

Debug Flags


List of Valid Values

You can set more than one debug option by simply adding the flag values together. For example, to set both the 256 and 4 options, use the value (256+4) = 260. Some flags may be locked out at your site in the Broker configuration file for security reasons (see below).

Value Description
1 Echoes all fields. Useful for debugging value-splitting problems.
2 Prints elapsed time after each run, for example, "This request took 2.46 seconds of real time (v1.0)." Also, can display the Powered by SAS logo if you provide additional settings as described in Displaying the Powered by SAS logo.
4 Lists definitions of all services as defined by the administrator, but does not run the program.
8 Skips all execution processing.
16 Displays output in hexadecimal. This is extremely handy for debugging problems with the HTTP header.
128 Sends back log file. Useful for diagnosing problems in the SAS code.
256 Traces socket connection attempts. This may be helpful when trying to diagnose the machine selection process.
512 Show socket host and port number in status message (off by default for security).

There are several other debug flags not documented here that should be used only at the request of Technical Support.

Disabling Debug Flags

In the Broker Configuration file, you can specify the debug values that users are and are not allowed to set. The DebugMask and ServiceDebugMask directives that control this are global and by-service. The explanation that follows describes the DebugMask directive but applies to the ServiceDebugMask directive as well.

The default value for the DebugMask is 32767, which is fine for most sites. The value 32767 indicates that all debug values are allowed. If you comment out the DebugMask option by maintaining the # sign in front of DebugMask, you are also allowing all debug values. Some debug values may represent a security risk, so you may want to selectively disable them here by specifying a different DebugMask value. Setting a different DebugMask value dictates the allowable values for the _DEBUG field in the HTML form or link.

The value 32767 is the sum of all the allowed debug values (1 through 16384). The following graphic shows all the bits enabled for the DebugMask=32767 value (in binary notation):

16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

If you wanted to prevent the use of debug value 256, you would disable the DebugMask bit for 256, as shown next:

16384 8192 4096 2048 1024 512 256 128 64 32 16 8 4 2 1
1 1 1 1 1 1 0 1 1 1 1 1 1 1 1

To allow all debug values except 256, enter a DebugMask value of 32511 (32767-256), or to allow only debug values 2 and 256, enter a DebugMask value of 258 (2+256). The latter technique is safer because additional debug values exist that are not documented and could be a security risk if you enable them.

If the binary values for _DEBUG and DebugMask do not equal 0 using binary logic, the Dispatcher displays an error. The Dispatcher performs this error checking only on the _DEBUG value in the HTML form or link. It does not check to confirm that Debug and DebugMask do not overlap.


Contents SAS/IntrNet 1.2: Application Dispatcher Previous Next