FAQ: How can I view the debugging output of MIPAV?

From MIPAV
Revision as of 18:38, 26 March 2009 by Mccreedy (Talk | contribs)

Jump to: navigation, search

NOTE: The below text is taken from the InstallAnywhere8 user manual. It applies to both the debugging the MIPAV installers and debugging an installed MIPAV instance (i.e., C:\Program Files\mipav\mipav.exe). [1]



Debugging a Win32 installer

To view or capture the debug output from a Win32 installer, hold down the <CTRL> key immediately after launching the installer and until a console window appears. Before exiting the installer, copy the console output to a text file for later review. On some Windows NT systems, run the installer once with the <CTRL> key down, resetting the scroll back buffer for the console window, then quit and run the installation again.

If there are problems capturing the console output, try a slightly more convoluted method (this will often be the case on Win9x because of the limited ability of the console to capture output). First launch the installer and allow it to extract the necessary files. Once it reaches the “Preparing to Install...” window, when given the opportunity to choose a language or to go to the Windows “temp” directory, look for a temp folder which starts with an 'I" followed by many numeric digits (ex. I1063988642). Be sure it is the most recent directory, by sorting the directories by their “modified” date. Open the directory, there should be a file called “sea_loc”. Delete this file. Now go back to the installer, click OK, and at the first opportunity, cancel the installation.

Now go back to the directory inside the temp directory, where the file “sea_loc” was deleted. There should be another directory called “Windows”; open it. There should be an .exe file (most likely “install.exe”). There should also be another file with the same name except it will have a .lax extension. Open it with a plain text editor and edit the lines:

lax.stderr.redirect= AND lax.stdout.redirect=

to be:

lax.stderr.redirect=output.txt AND lax.stdout.redirect=output.txt

After these changes have been made, save the file and launch the .exe. When the installation is complete there should be an output.txt file in the same directory as the .lax file. The output.txt file will contain the same information as that generated to the console.


Debugging a Unix/Linux installer

To capture the debug output from the Unix command line developers need to perform the following: enter one of the following (based on which shell) at the command line prior to executing the installer:

  • export LAX_DEBUG=true or
  • setenv LAX_DEBUG true or
  • LAX_DEBUG=true or
  • set LAX_DEBUG or
  • whatever would be appropriate for the Unix shell.

Then run the installer. The output that is produced should help debug the installer.


Debugging a Mac OS X Installer

InstallAnywhere utilizes the standard output layers in Mac OS X to display output. To gather debugging output from an OS X installer, launch Console.app found in / Applications/Utilities. To retain this information, cut and paste information from the console window to a file.

If you do not see debug output from an installer, check the Info.plist file inside the installer. To do this, Control-click (or right click) on the installer and select Show Package Contents. Inside the Contents folder you will see an XML file named Info.plist. You’ll need to change:

<key>lax.stderr.redirect</key> <string></string> <key>lax.stdout.redirect</key> <string></string>

to

<key>lax.stderr.redirect</key> <string>console</string> <key>lax.stdout.redirect</key> <string>console</string>

When you relaunch the installer, the installer output should be now listed in Console.app.


Debugging a Pure Java Installer

There are two methods to debug the Pure Java, or other platforms installers. Place a file named ia_debug in the same directory as the JAR, which contains the installer. Placing this file will not direct the output into this file, but its existence will redirect the output to the console.

Set the General Settings to create output prior to building the installer.


Debugging LaunchAnywhere Launched Executables

Since InstallAnywhere installers use LaunchAnywhere executables, the above procedures are also useful for debugging installed applications that make use of the LaunchAnywhere Java launcher technology. Generally, however, it’s quite simple to alter the LAX file to allow the launcher to always generate output. This behavior can then be changed upon qualification and final release.