InstallShield 2010 InstallScript Debugger User Guide

Stopping a Script that Is in an Endless Loop To stop a script that is in an endless loop: 1. To change the focus from your setup’s window to the debugger’s windows, press ALT+TAB. InstallShield 2010 InstallScript Debugger User Guide Copyright Notice Copyright © 1996-2009 Acresso Software Inc. and/or InstallShield Co. Inc. All Rights Reserved. This product contains proprietary and confidential technology, information and creative works owned by Acresso Software Inc. and/or InstallShield Co. Inc. and their respective …
debugging InstallScript-Based Installations Debugging is the process of finding and correcting logic errors in computer software. Those are the errors that can cause a script to operate incorrectly or to halt unexpectedly. Unlike syntax errors , logic errors are not detected by the compiler, which ensures only that statements are expressed correctly. Statements with logic errors look perfectly fine to the compiler. It cannot tell whether or not the instructions expressed by those statements are complete and correct. Detecting Logic Errors The best way to detect logic errors in a completed script is to execute that script and observe its operation. Most serious logic errors will turn up while you’re developing and testing a script; however, some logic errors can remain hidden in scripts long after they are put into use, only to surface unexpectedly when the script is run on a particular computer or when a user selects a certain sequence of functions or inputs a particular value. Logic errors can be fatal, bringing the script to an abrupt halt and displaying a run-time error message to the user. Or they can be subtle; the script executes, but there are problems with its appearance and/or behavior. Perhaps it installed files in a folder other than the one selected or it may not have placed a shortcut on the desktop or in the Windows Start menu, even though that option was selected during the setup. Resolving Logic Errors Once you have observed a bug or received a report of a bug, you should follow the steps below. 1. Run the setup and reproduce the error . Be sure you understand the nature of the error before going on. 2. Review your script and identify the probable location of the error . 3. Use the InstallScript Debugger to analyze the error . 4. Use the InstallScript view to correct the error in your script. 5. Recompile your script and verify that the error has been corrected .
2 ISP-1600-UG00 InstallShield 2010 InstallScript Debugger User Guide Chapter 1: Debugging InstallScript-Based Installations InstallScript Debugger InstallScript Debugger The InstallScript Debugger is a source-level debugger. It displays debugging controls and your installation script in different panes of the same window. In the script pane of the window, the statement to be executed next is indicated with a visual marker, called the execution point. From the InstallScript Debugger you can execute your script, statement by statement, and trace the flow of control by watching the execution point as it moves in the script pane of the InstallScript Debugger window. You can also monitor the value of any variable in your script at any point during script execution. With these methods, you can more easily identify sources of script error and inefficiency. Script Window The script window displays your script so that you can view it as you run it. The next statement to be executed is positioned in the window and indicated by an yellow arrow. Lines with breakpoints have magenta circle on the left and you cannot set and remove breakpoints by double-clicking on a line. The title bar of the script window shows the full name of the setup file and the number of the first source line in the window. As you scroll this window, the line number in the title bar is updated so that it always identifies the number of the first line in the window. Note that you can scroll the window to any location in your script, but unlike the editor, the debugger does not offer a keyboard shortcut to scroll to a specific line by number. The script window scrolls automatically if necessary when you use the Step Into or Step Over commands to trace through a set of statements. Likewise, when script execution is halted at a breakpoint, the window is scrolled automatically to display the location of the breakpoint. Watch Window The Watch window displays the current value of each string and numeric variable that you have selected to watch. You can add and delete variables from this window at any time while you are debugging. Button Controls The nine buttons located on the toolbar enable you to control the execution of the script. Table 1-1: Button Descriptions Button Description Open Allows you to open a script file. Toggle Breakpoint The toggle breakpoint button allows you to place or remove a breakpoint. Go Begins script execution. Use this button to execute to the next breakpoint or to the end of the script if there are no remaining breakpoints…
Download InstallShield 2010 InstallScript Debugger User Guide.pdf