Every now and then somebody says to me:
I just added my assembly to the gac and now I can’t debug my code anymore
The fact is that debugging gac assemblies is quite easy when you know how to do it.
The problem with debugging gac assemblies is that you can’t add the pdb file to the gac. What you need to do is to find the actual folder where your assembly is stored and copy your pdb file into this location.
To find this folder you need to run the following command from start->run:
Navigate to your assembly by drilling down in the folders.
Copy your pdb file to the same folder as your dll.
You should now be able to debug your assembly by attaching to the running process.
( If you are not building your assembly as a MSIL assembly you will find it under: C:\WINDOWS\Assembly\GAC or C:\WINDOWS\Assembly\GAC_32 )