Debugging Wix Installer

How do you debug an installer created using Wix ? This short article shows an easy way to debug your Wix Installer Custom Actions. In fact, it turns out to be pretty easy.

All you need to do is to add a call to System.Diagnostics.Debugger.Launch() your custom action. For example,

[CustomAction]
public static ActionResult DemoMethod()
{
   System.Diagnostics.Debugger.Launch();
   DoSomething();
   return ActionResult.Success;;
}

Ensure you have compiled the setup using debug mode and launch your setup. As the setup reaches the call for DemoMethod Action, it would invoke the following UI.

You can now attach your project to the process and debug your application.

That turned out to be easy right?

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s