- Determine the name of the custom action you want to debug
- Ensure you have the source code and debug symbols for your custom action
- Set the MsiBreak environment variable (user or system) to the name of the custom action. For example:
Setx MsiBreak MyCustomActionName
- Run your installer
- At the point where your custom action is about to run, you should get this message box prompt:
- Now you can use Visual Studio or another debugger such as WinDBG to attach to the specified process.
- Click OK on the message box
- This should break into your debugger. This is a good time to set your breakpoints in your custom action code.
- When ready, run/continue the debug session.
- Your custom action should run and your breakpoint(s) will be hit.
Debugging Custom Actions @ msdn.microsoft.com