One of these days, I needed again to debug an extension and was not able to do it, so looked again how to debug from the IIS attach and found several tutorials, and through them i was able to do it again. Heres my tutorial,
Requirements:
1)Acess to the server
2) Microsoft Visual Studio installed in the server
Tutorial
1) In the Integration Studio, select Options (EDIT->OPTIONS) check if in the TAB .NET, the last field is filled (.NET Compiler Tool Options) with the option DEBUG, if is with RELEASE change it to DEBUG:
Example:
/nologo /verbosity:minimal /target:Rebuild /property:Configuration=Debug
2) Open the project in Microsoft Visual Studio and edit BUILD properties for the following options:
3) Build the project and publish the extension (Ensure that the PDB file is included in our Extension, if not select it, right click and choose Include in the project)
4) Republish the espace that uses the extension (if is a action that is used in other espaces, they need to be republish too)
5) Open the page and activate the option that calls the extension (this is very important because it is this action that causes the module to be created on the server)
6) Access the server locally to record the extent of the project (using the Integration Studio or simply copying from another machine there)
7) Open the Microsoft Visual Studio with
Run as Administrator (important) and open the extension project(visual studio)
8) Now we go to attach to Process IIS(w3wp.exe)

Note: The option "Show processes in all sessions" need to be selected
9) Access to Modules (and wait for the press, because it takes a while)
10) Load the PDB file (select your extension, and the espace used in step 5)
If the Symbol is not loaded is necessary the following step:
-
Add the project BIN directory to the directory list and press OK
-
Procedure to load the Symbol information
11) Add your breakpoints, and its done. When you load the page (always on the server) will stop ate the breakpoint.
12) After the debug, we need to remove the PDB from the extension (step 3) and republish the extension without Debug (that we change on step 1).
So we go back to step 1 and change from Debug to Release and now step 3 to remove the PDB file. Now you can publish the final version of your extension.
Regards,
Luis