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
- Set the MsiBreak environment variable (user or system) to the name of the custom action. For example, if your custom action is called MyCustomAction:
Microsoft.Playwright.PlaywrightException: Error: The language "cmd" has no grammar.
at Object.highlight (http://127.0.0.1:41899/main.js:3978:11)
at eval (eval at evaluate (:226:30), :2:18)
at UtilityScript.evaluate (:233:19)
at UtilityScript. (:1:44)
at Microsoft.Playwright.Transport.Connection.InnerSendMessageToServerAsync[T](ChannelOwnerBase object, String method, Dictionary`2 dictionary, Boolean keepNulls) in /_/src/Playwright/Transport/Connection.cs:line 209
at Microsoft.Playwright.Transport.Connection.WrapApiCallAsync[T](Func`1 action, Boolean isInternal) in /_/src/Playwright/Transport/Connection.cs:line 535
at Microsoft.Playwright.Core.Frame.EvaluateAsync[T](String script, Object arg) in /_/src/Playwright/Core/Frame.cs:line 548
at SiteGen.Extensions.Markdown.Prism.PrismHost.Highlight(String source, String language)
at SiteGen.Extensions.Markdown.Prism.PrismCodeBlockRenderer.Write(HtmlRenderer renderer, PrismCodeBlock obj)
- Run your installer and wait for the message box prompt
Details
When your custom action is about to execute, 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.
References:
Debugging Custom Actions @ msdn.microsoft.com