Saturday, September 17, 2011

How to debug InstallerClass

 

In the Setup project of VS.NET, you can write a InstallerClass and attach that to the Custom Action of the Setup project to do some custom steps like checking certain services, copying special files etc.

To debug this InstallerClass, just insert below line of code at the location you wish to set the break point.

System.Diagnostics.Debugger.Break();

When running your installer, Windows Installer will understand that’s a user defined breakpoint and let you chose to debug the program. See screen shots below.

After that, you can just press F10 to step through your code.

image

image

No comments:

Post a Comment