How to debug scripts using Wise Installer script debugger
2008-05-26 11:34
609 查看
Article ID: 17555
How to debug scripts using Wise Installer script debugger
The information contained in the Altiris Knowledgebase is subject to the Terms of Use as outlined at http://www.altiris.com/legal/termsofuse.asp.
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. |
相关文章推荐
- How to Cheat at Windows System Administration Using Command Line Scripts
- If you have multiple web application run how to determin which is yours when you debug using visual studio 2008?
- ActionScript: How to generate UUID using Actionscript
- How to make JDev run ant script in debug mode permanently
- How to Debug C Program using gdb in 6 Simple Steps
- HOW-TO:Debug Python Scripts with Eclipse
- To pack your python scripts to EXE by using PyInstaller3.0
- 使用pdb调试openstack (How to debug openstack using pdb )
- How to Set Directory Permissions at Install Time using an MSI Created Using Windows Installer XML (WIX)
- JDev: How to make JDev run ant script in debug mode permanently
- How to Enable Trace or Debug for APIs executed as SQL Script Outside of the Applications ?
- HOW-TO:Debug python scripts with WinPDB
- How to live debug managed code using windbg
- How to Enable Trace or Debug for APIs executed as SQL Script Outside of the Applications ?
- How to merge two images into one using Actionscript
- how to debug python script
- How to secure an Ubuntu 12.04 LTS server - Part 2 The GUI installer script
- How to debug user-mode process using kernel-mode windbg in Win7
- How to deploy an Analysis Services database using a script
- How to Enable Trace or Debug for APIs executed as SQL Script Outside of the Applications ?