SharePoint Blogs / SharePoint University
SharePoint Blogs and SharePoint University - all in one place!
Need SharePoint Training? Attend a SharePoint Bootcamp!

Please delete cookies related to sharepointblogs.com and sharepointu.com to resolve login issues!

Remote Debugging GAC'd Assemblies in SharePoint

Like alot of people in the SharePoint development community I have been using a VPC to do debugging of code through SharePoint. I don't really like this because for one, running an enterprise level application plus visual studio with a laptop and 2GB of memory is very time consuming and can get frustrating at times.

With this said, I recently decided to look into remote debugging my SharePoint code from a client machine to the SharePoint server. I still didn't want to load up visual studio on the server either. Below are the steps that I took to accomplish remote debugging my SharePoint code.

  1. Created a share on my client machine on my C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\Remote Debugger folder.
  2. Then I remoted into the SharePoint server and mapped a drive to connect to the share on my client machine.
  3. Open the mapped drive on the server and navigate down the folders to x86\msvsmon.exe and run it on the server through the share.
  4. Once the remote debug monitor is running. Click on tools -> permissions to give the account your logged in as permissions to debug.
  5. You will also need to deploy the PDB file generated by visual studio when it creates your assembly to the GAC as well on the server. You will need to copy via the command line utility or map a drive to it since it is not available through the folder structure in windows. the folder you have to copy the PDB file to is c:\windows\assembly\gac_msil\<assemblyname>\<version>__<public key token>. You will need to replace the three place holders (identified with <>) with the appropiate names for your assembly. Once the PDB file is copied over to that folder location, you are ready to attach and debug
  6. In visual studio, select attach to process from the debug menu
  7. In the "Qualifier" text box enter the netbios name of the server that the remote debugging monitor is running. It should refresh the screen and connect to the remote debugging session on the server. You can verify by going to the server and looking at the remote debugging monitor to see who is connected.
  8. I choose to change the types of code I will be attaching to. I used the "select..." button to remove TSQL from the list since it was causing issues and I wasn't debugging SQL anyway.
  9. Select your process and happy debugging.

Good Luck!

 


Posted 04-10-2008 3:48 PM by dwollerman

Comments

map share wrote map share
on 04-16-2008 10:26 AM

Pingback from  map share

Ben wrote re: Remote Debugging GAC'd Assemblies in SharePoint
on 08-05-2008 2:37 AM

Dose not seem to work

dwollerman wrote re: Remote Debugging GAC'd Assemblies in SharePoint
on 08-05-2008 7:14 AM

Ben, What doesn't seem to work for you? Is there a specific step that is causing the issue?

dataCore wrote re: Remote Debugging GAC'd Assemblies in SharePoint
on 09-11-2008 8:29 AM

thx - it work's

But I don't need to use the "Map network drive". I only installed the "Remote Desktop" on my sharepoint server (64x) and start it there.

Then I do step 4-9

Community Blogs wrote Setting up remote debugging on 2003 and 2008 server
on 01-16-2009 4:15 PM

For a long time I have wanted to be able to do this without it being a 2 day ordeal, or having to beg

Guide to set up remote debugging on 2003 and 2008 server | WebHost4Life wrote Guide to set up remote debugging on 2003 and 2008 server | WebHost4Life
on 01-19-2009 11:44 PM

Pingback from  Guide to set up remote debugging on 2003 and 2008 server | WebHost4Life

Setting up remote debugging on 2003 and 2008 server | Web Hosting and Domains wrote Setting up remote debugging on 2003 and 2008 server | Web Hosting and Domains
on 01-21-2009 7:09 AM

Pingback from  Setting up remote debugging on 2003 and 2008 server | Web Hosting and Domains

GEP wrote re: Remote Debugging GAC'd Assemblies in SharePoint
on 06-10-2009 9:27 AM

Tried this, but I am on VPN.. Not working as described. Get to the point when I refresh the service list, and I get the message that "Montior does not seem to be running on remote machine..". I have a Citrix window open and it is running..

The machine I am developing on is not in e.g. "Computers" in AD where I connect to. I am using XP Pro, Visual Studio 2008... Guess I have to revert back to my Virtual Server again... :(

GEP wrote re: Remote Debugging GAC'd Assemblies in SharePoint
on 06-10-2009 9:35 AM

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
Need SharePoint Training? Attend a SharePoint Bootcamp!
Posts (c) their respective authors. Everything else (c) 2009 SharePoint Experts, Inc.