Monday 30 November 2009

How to Enable Debugging on an Activex component?

Problem:
I had an Activex component which was created using C# Class Library Project template. and the debugger couldn't debug it.

Solution:
  1. Execute the page on IE.
  2. Once you have the page up and can see your ActiveX control, switch to Visual Studio and click on the 'Debug' menu item. Click on 'Attach to Process'.
  3. On the Attach to Process screen, click on 'Select...' next to the Attach to: label. Select Managed Code and click on 'OK'.
  4. In the Available Processes section, select 'iexplore.exe' and click on 'Attach'.
  5. You can now debug the code

No comments: