cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Debugging a Setup on a Test Machine

Debugging a Setup on a Test Machine

Summary

How to debug the setup on the target computer

Synopsis

To find bugs occurring only with certain hardware or software configurations, you may need to debug your setup on a system other than your development machine. In that case, it's not necessary to set up InstallShield on that computer. Instead, follow the steps below to debug the setup on the target computer.


Discussion

After compiling and building your setup on the development system, you are ready to debug on a test machine. In addition to the media, these are the additional files required for debugging:

  1. InstallShield script debugger - This is a COM application housed in Isdbg.exe. The setup communicates with the debugger over COM interfaces. Isdbg.exe resides on any machine that has the InstallShield installed:

    C:\Program Files\InstallShield\<Version>\System

    Isdbg.exe can run standalone as it has only standard dependencies (KERNEL32, USER32, etc.).

  2. Debug symbols file - Setup.dbg

    Setup.Dbg is always generated in the script files folder when you compile the script from the IDE. If you're using the command line compiler - Compiler.exe, use the /g switch to generate this file. It contains symbolic information from your source (*.rul) files. Symbolic information includes variable names, function names, source file, and line number information. The full path to the symbols file is embedded in the compiled script file (Setup.inx).

    If Setup.dbg is not being generated at build time, uncheck the checkbox labeled "Generate inline debugging information" in the Build > Settings menu.

Setting up the test machine to debug a setup

The way you set up your test machine depends on whether it can connect to the development machine via a network. Listed below are steps necessary address both scenarios.

For machines connected via a network:

  1. Register the debugger-Since the debugger is a COM application, the file Isdbg.exe must be registered on the test machine. To register Isdbg.exe, run it with the /REGSERVER command line.

  2. Make the debug symbols file and source files accessible to the test machine.

For machines not connected via a network:

  1. Register the debugger-Since the debugger is a COM application, the file Isdbg.exe must be registered on the test machine. To register Isdbg.exe:

    1. Run it with the /REGSERVER command line. You must copy Isdbg.exe to the test machine. When you copy Isdbg.exe, it is recommended that you copy it to the <COMMONFILES>\InstallShield\Iscript folder.

    2. If this folder does not exist, you must create it.

  2. Make the debug symbols file and source files accessible to the test machine-Copy the whole script files folder of your installation folder to the test machine. This will make Setup.dbg and the source files accessible to the test machine.

Debugging the setup

The command line for launching a setup in debug mode is: SETUP /d<PATH to the debug file>.

For instance, if your development machine is called SETUPDEV and the My Installations folder is shared with the same name, to debug the setup "My Cool App" the command line would be:

"\\SETUPDEV\My Installations\My Cool App\Media\Default\Disk Images\Disk1\Setup.exe" /d"\\SETUPDEV\My Installations\My Cool App\Script Files"

Note: A path name should be the only thing following the /d parameter. The InstallShield 6.x debugger will not find the symbols file if the command line option includes the file name.

To debug setups outside the IDE on the development machine, just use "SETUP /D". You may skip specifying the symbols file path in this case.

If the debugger cannot find a source file, it will prompt you with a select folder dialog.

Troubleshooting debugging problems

If you cannot get the debugger to come up, verify the following:

  • Debug symbol file was generated-Open Setup.inx in Notepad and scroll to the end of the file. You should find the full path to the .dbg file in the end of the file.

  • Debug symbol file is present-Verify if Setup.dbg is present in the location you specify in the /d option. There should be no space between /d and the path in the Setup.exe command line. The /d option should not include the debug symbols file name, only the path should follow /d.

  • Debugger is registered-Check for the existence of the registry key HKEY_CLASSES_ROOT\Setup.ScriptDebugger.

  • Debugger is present-Find the Class ID of the debugger by looking at the default value of the registry key: HKEY_CLASSES_ROOT\Setup.ScriptDebugger\CLSID. Check if the file (Isdbg.exe) pointed to by the registry key HKEY_CLASSES_ROOT\CLSID\<Registry Key Default Value>\LocalServer32 is present.

    For example, the registry value found in HKEY_CLASSES_ROOT\Setup.ScriptDebugger\CLSID is {D933159F-04BF-4CA5-ADF9-942F4DAC9EA7}, so you would need to check HKEY_CLASSES_ROOT\CLSID\{D933159F-04BF-4CA5-ADF9-942F4DAC9EA7}\LocalServer32 for Isdbg.exe.

  • On some systems, the debugger may have problems resolving paths. Try adding all files to a single folder off the root drive, where the folder name does not contain any spaces, and try debugging from there.


Additional Information

For more information, see the InstallShield Help Library topics:

Debugging Scripts?

Setup Scripts

Was this article helpful? Yes No
No ratings
Version history
Last update:
‎Dec 03, 2007 01:48 PM
Updated by: