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?