Debugging Business Desk

The Business Desk Framework includes a number of debugging capabilities of which you should be aware. There are also some miscellaneous factors that you should keep in mind. These can be divided into the following categories:

  • XML Configuration File Changes

  • Debugging HTC Problems

  • XMLHTTP Debugging in Framework Routines

  • XMLHTTP Debugging in the ListSheet and TreeView HTCs

  • Global Flags for Debugging

XML Configuration File Changes

Remember that after making changes to XML configuration files in the Config folder, you must restart the Internet Information Services (IIS) application before the changes will be visible in the user interface.

The output generated by the SHOW_OBJECT_ERRORS and VERBOSE_OUTPUT flags will only display the first time Commerce Server Business Desk is run after the IIS application is restarted. SeeĀ Global Flags for Debugging for more information.

Debugging HTC Problems

The m_bDebug variable in each HTC file, when set to True, will show developer errors in alerts. You should try this technique whenever an HTC fails to load on the page.

Whenever you change settings in the HTCs, you may want to verify that Internet Explorer is configured to load pages every time they are requested.

To verify that Internet Explorer is configured to load pages every time they are requested

  1. In Internet Explorer, on the Tools menu, click Internet Options.

  2. On the General tab, in the Temporary Internet Files section, click Settings.

  3. In the Settings dialog box, verify that the Every visit to the page option is selected.

XMLHTTP Debugging in Framework Routines

The bDebug variable in the routines xmlPostFormViaXML and xmlUpdateServerState in the file HTTPXMLUtil.htm, when set to True, displays the data being sent and received when using XMLHTTP to post to server. These debug messages are displayed using the dlg_debug.htm page.

XMLHTTP Debugging in the ListSheet and TreeView HTCs

The m_bDebugHTTPXML variable in the HTC files ListSheet.htc and TreeView.htc, when set to True, will display debug information from within the routine xmlPostToServer. It will display the data being sent and received when using XMLHTTP operations. It will display three alerts for each XMLHTTP fetch operation: one for the data that is sent, one for the returned text, and one for the returned XML.

Whenever you change settings in the HTCs, you may want to verify that Internet Explorer is configured to load pages every time they are requested.

To verify that Internet Explorer is configured to load pages every time they are requested

  1. In Internet Explorer, on the Tools menu, click Internet Options.

  2. On the General tab, in the Temporary Internet Files section, click Settings.

  3. In the Settings dialog box, verify that the Every visit to the page option is selected.

Global Flags for Debugging

The MSCSEnv variable in the Global.asa file for Business Desk, when changed from PRODUCTION to DEVELOPMENT, or vice versa, will modify many of the following debug flags at once:

VERBOSE_OUTPUT

When set to True, shows detailed output while loading the XML configuration upon application start, then shows tables representing Dictionary objects stored in the application. Click Refresh to load Business Desk when you are done looking at the output.

SHOW_OBJECT_ERRORS

When set to True, shows XML and other errors in a modeless dialog box upon loading the XML configuration.

AUTO_REDIRECT_ENABLED

When set to True, keeps users from loading a Business Desk page outside the normal Business Desk frame structure (which is enforced in the file BizDeskUtil.asp).

FORCE_HTA_ONLY

When set to True, disallows browsing Business Desk outside of the HTML Application (HTA) provided by the client installation. Setting this variable to False allows you to use the URL "//servername/bizdeskrootname/bizdesk.asp" to run Business Desk in a normal browser.

ALLOW_CONTEXT_MENUS

When set to True, allows right-click context menus so that you can use Refresh and View Source to investigate page failures.

SHOW_DEBUG_TEXT

When set to True, shows a variety of debug information in various ways, as follows:

1. Task and module targets on mouseover.

2. Disabled modules as ERROR (usually file not found) or FILTERED (by user ACLs).

3. Contents of the Request, Session, and Application objects in legend area of status bar.

4. The state of the dirty, required, and valid flags for the page in the title bar.


All rights reserved.