Search code examples
c#.netwindows-installervisual-studio-debugging

Debug using attach to process of windows installer


I have my .msi windows installer project with multiple services to install. I have a NullReferenceException during installation and I would like to debug installation process to figure out what is going on. I tried Debug > attach to process but it didn't hit any breakpoint. Debugger.Break() didn't help me as well. Can somebody explain how to solve this problem?


Solution

  • I added Debugger.Launch(); to my public override void Install(IDictionary savedState) and it solved my problem. Now I can debug using attach to process feature.