Tag Archives: installer

HOW TO: Debug a Windows Installer custom action

Prerequisites:

  • Determine the name of the custom action you want to debug
  • Ensure you have the source code and debug symbols for your custom action

Steps

  1. Set the MsiBreak environment variable (user or system) to the name of the custom action. For example:

    Setx MsiBreak MyCustomActionName

  2. Run your installer
  3. At the point where your custom action is about to run, you should get this message box prompt:

  4. Now you can use Visual Studio or another debugger such as WinDBG to attach to the specified process.
  5. Click OK on the message box
  6. This should break into your debugger. This is a good time to set your breakpoints in your custom action code.
  7. When ready, run/continue the debug session.
  8. Your custom action should run and your breakpoint(s) will be hit.

References:

Debugging Custom Actions @ msdn.microsoft.com