Professional > Interview scripting > Writing interview scripts > Creating wizards for UNICOM Intelligence Reporter > UNICOM Intelligence Reporter wizard examples > Example setup for debugging
 
Example setup for debugging
All of the wizards have a debugging section that you can use as an example. The section includes functions that support loading the target_mtd and setting up other required intrinsics.
The following example shows the wizard setup for debugging in UNICOM Intelligence Professional :
' Set to True when debugging in Professional and uncomment the Dim statement
Const DEBUG_WIZARD = True
Dim target_mtd, tables_selected[]

If (DEBUG_WIZARD) Then
' Initialize the tables document for quicker testing
' Reporter_ChooseMTD.Response.Initial = ".\Test.mtd"
Reporter_ChooseMTD.Ask()

Set target_mtd = LoadTarget(CText(Reporter_ChooseMTD.Response))

' Initialize the tables question used to mimic Reporter
InitializeItemList(target_mtd.Tables, Reporter_Select.Tables)

' Ask the user to select tables
Reporter_Select.QuestionFilter = "Tables"
Reporter_Select.Ask()

' Convert the responses to match what Reporter would normally send
CreateTablesSelected(target_mtd, Reporter_Select.Tables, tables_selected)

' For testing purposes, the LayoutTemplate and Question_Templates_Files directory must be local
' When running from reporter the TemplateLocation is set to the Templates directory
IOM.LayoutTemplate = "Wizard_Layout.htm"
End If
See also
UNICOM Intelligence Reporter wizard examples