Thursday, January 24, 2008

Advanced dubugging during installer builds

You might have encountered many instances where you need to turn on advanced debugging options to get proper and detailed debugging information. The usual build log does not provide detailed information. Some time you struggle through a Java I/O error or your custom code or your source code management system is behaving improper.
 
There have been instances when I noticed a build success but the installation operation failing, even after trying various options with my Install Anywhere IDE nothing was useful. Finally playing with the InstallAnywhere lax properties file worked for me.
 
These were the steps I took to get things working..
 

1.) Close the IDE.

2.) Open the file <IAHOME>/InstallAnywhere.lax in a text editor.

3.) Modify the following properties in the file so they read as follows:

lax.stderr.redirect=console

lax.stdout.redirect=console

4.) Add the following line to the top of the file:

lax.nl.java.option.additional=-Dlax.debug.level=3 -Dlax.debug.all=true

5.) Save the .lax file and close it.

6.) Start the IDE with the following command:

./InstallAnywhere 1>buildConsole.txt 2>&1

7.) Run the build.

Once you are done with these steps you will notice a launch anywhere window opening during the build, when your build finishes all the stderr that you were able to see in the console windows is written into a console.txt file at your <IA_HOME> directory.

A tweak here is that, if you keep this option on-ever you will always see a debug console opening whenever you launch a InstallAnywhere application, so it depends on you discretion to turn on this feature or to turn it off as it gives you a detailed report of your operations performed at the cost of few extra CPU cycles and additional memory usage.

Keep reading there are more to come.... :)

2 comments:

Gopinath said...

Is there a way to debug in the eclipse IDE, the custom code in my installer project runtime?

Prasanna said...

add all the custom code classes in eclipse plugin and try it