Desktop User Guides > Professional > Interview scripting > Writing interview scripts > Creating questionnaire wizards for UNICOM Intelligence Author > Debugging wizards
 
Debugging wizards
Wizards can be debugged in UNICOM Intelligence Professional. However, because there is no way for UNICOM Intelligence Professional to set wizard variables implicitly, for testing purposes, you will need to create the variables and set them equal to IDocument instances. When testing is complete and the wizard is ready to be deployed, you should comment out those lines of code.
For example, you can add the following lines to the top of your wizard:
' FOR TEST PURPOSES
Dim source_mdm, target_mdm
Set source_mdm = CreateObject("MDM.Document")
' Open the source document that will be edited by the wizard
' and then inserted into the target by Author
source_mdm.Open("..\Continuum Grid Wizard.mdd", , openConstants.oNOSAVE)
Set target_mdm = CreateObject("MDM.Document")
' Open a test target document or
' leave this line commented out to use an empty document
target_mdm.Open("Test.mdd", , openConstants.oNOSAVE)
' Use the standard wizard layout template to see what it will look like
IOM.LayoutTemplate = "..\..\..\Templates\Wizard_Layout.htm"
Add the following lines after the wizard completes:
' FOR TEST PURPOSES
' Save the edited source
' This source will be inserted into the target by Author
' Open the output mdd in Professional or Author to check it
source_mdm.Save("Test_Output.mdd")
You can then use UNICOM Intelligence Professional as you normally would to single-step and view locals.
The supplied Continuum Grid Wizard.mdd Library/Gallery item has commented-out sections that can be used as an example.
See also
Creating the wizard