Experience in C++, C#, Java and Process : Living in Montreal

* What is my technical experience as a software developer

* What I have learned in the software business

* Where I am heading to in my career

* How to process in a project

Thursday, December 07, 2006

How do I debug a custom action/installer class?

You can use one of the following methods:
Add a call in your code to System.Diagnostics.Debugger.Launch. This method opens Just-In-Time debugging and allows you to attach a new debugger to your code.
Add a call in your code to MessageBox.Show("Debug Me"). When the message box is shown, use Visual Studio to attach to the MessageBox process. Then place breaks (for Visual C# projects) or stops (for Visual Basic projects) in the code.
Set your debugging preferences to start InstallUtil.exe (which is located in \winnt\Microsoft.net\Framework\version) and pass it your assembly as a parameter. When you press F5, you hit your breakpoint. InstallUtil.exe will run your custom actions the same way that MSI does.

3 Comments:

  • At 9:08 AM , Anonymous Anonymous said...

    Very helpful! The System.Diagnostics.Debugger.Launch() call worked well for me. Thanks.

     
  • At 6:46 PM , Anonymous Anonymous said...

    I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

    Sorry for offtopic

     
  • At 4:42 AM , Anonymous Anonymous said...

    Who knows where to download XRumer 5.0 Palladium?
    Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

     

Post a Comment

Subscribe to Post Comments [Atom]

<< Home