Summary:

If you're using Visual Studio to write custom .Net dlls using the .Net api for CRM and you need to debug your code by setting breakpoints you can follow the instructions here to attach your debugger to the IIS process: https://community.sagecrm.com/developerhelp/Default_Left.htm#CSHID=Developer%2FDN_DotNETAPIDebugging.htm|StartTopic=Content%2FDeveloper%2FDN_DotNETAPIDebugging.htm|SkinName=Neutral 

You may find that your breakpoints are not being triggered if you follow the above documentation so to force your breakpoints to be triggered you can use the instructions in this Community blog: https://community.sagecrm.com/partner_community/b/net_development_tips/archive/2011/01/05/debugging-crm-net-api-dlls.aspx

This article describes how you can use the line:

System.Diagnostics.Debugger.Break();

in your code to cause the OS to look for a debugger currently running, if you have your project open it will allow you to choose it from a list of possible debuggers.

If you find that your breakpoints are now being triggered but the symbols are not loaded which allow you to step through your code even though you have placed the .pdb file in the CustomDotNet directory of CRM, you can:

1. Click on the DEBUG->Attach to Process... menu of Visual Studio.

2. Find the process w3wp.exe with the Attach to setting of "Automatic: Managed (v3.5, v3.0, v2.0) code" 

3. Then click on the Select button and choose the option "automatically determine the type of code to debug" to debug "Managed (v4.0) code" in the Attach to Process screen.