Monday, April 27, 2009

Steps to debug .NET dll (registered in GAC) consumed by unmanaged vb6 code

To debug Shared dll in GAC called by VB6 code:


0.) Unregister shfusion.dll in c:\windows\\framework\v<version>\shfusion.dll so that actual GAC folders are visible in Explorer.

1.) Open .NET project and make sure that "Just my code debugging is unchecked" in Tools > Options > Debugging.

2.) Now rebuild the .NET dll in debug mode.

3.) Add dll built in debug mode along with the PDB to GAC

4.) Run the vb6 component.

5.) Attach the .NET project to running vb6.exe process.

6.) Breakpoints will be loaded dynamically at runtime.



Anugrah Atreya


No comments: