How to debug scripts using Wise Installer script debugger

Article ID: 17555

How to debug scripts using Wise Installer script debugger


Applies To

 • Wise for Windows Installer 4.21, 5.21, 6.x

 

 


Question

 How do I debug scripts using Wise Installer Script Debugger?

 


Answer

 

(Note: This article was originally published in the December 2001 TechInfo! Newsletter. The information contained in this article is accurate for the products referenced, and has not been updated for later product releases.)

Have you ever wondered why you received error messages such as could not register DLL or variable not set during your installation? Have you wondered how you could find out where the error messages were coming from and how to correct them? The Wise Installation System Debugger gives you the ability to identify a problem in your script. This means that you can spend more of your time fixing the problem rather than trying to find it.

The Debugger, available in the Debug menu in Script Editor, lets you pinpoint the exact script line that's causing the problem. You can choose to run the Debugger in one of three ways:

  • Go. Go runs through the installation script from start to finish. It stops at any pauses (breakpoints) you set and repeats this process until it reaches the end of your script.
  • Set Breakpoints. Breakpoints enable you to set pauses as the Debug runs through your script. The Debug tool temporarily halts execution at each breakpoint, then resumes when you select the Go command.
  • Single Step. This process lets you run through the installation line by line from start to finish.

When you debug your installation (using any of the debug methods), a yellow arrow appears next to the line that is currently being executed in the Installation Script area. The Actions area displays all of the variables for your script. This gives you the opportunity to view the value of your variables at runtime. You can edit a variable's value while debugging by double-clicking it.

The Set Breakpoints option is the best way to run the Debugger when you are unsure which line in your script is problematic. To set a breakpoint, click the script action where you want the installation to stop, then select Set Breakpoint from the Debug menu. A red dot appears next to the script action and will stop when the Debugger reaches that point. Once you have the breakpoints set, select Go from the Debug menu to start the debugging process. The Single Step debug option is the best choice when you want to review each script line in your installation. To use this option, select Single Step from the Debug menu.

Suppose you receive a variable not defined error message. The Debugger gives you two methods of finding this error in your script. You can single step through your installation until you locate the line of code where this error occurs. You can go through the entire script once using the Go option. When the error occurs, the Debugger will halt execution and the yellow arrow will display the line of the script where the error occurred. When you are finished debugging, exit the installation and resume normal Script Editor operation by selecting Stop Debugging from the Debug menu.

The Debugger in Wise Installation System not only enables you to debug your script, but also lets you see exactly what the script is doing at any time and the values for variables that have been set. The Debugger is an ideal tool for locating the cause of errors that arise during an installation. It is also a useful way to confirm in a step-by-step manner that your installation executes as designed.

 


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值