Remote Debugging GAC'd Assemblies in SharePoint

本文介绍了一种在客户端机器上远程调试SharePoint服务器上的代码的方法。通过创建共享文件夹、映射驱动器、运行远程调试监视器并配置权限等步骤,可以实现在客户端使用Visual Studio进行调试。

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!

 

参考http://www.sharepointblogs.com/llowevad/archive/2008/04/10/remote-debugging-gac-d-assemblies-in-sharepoint.aspx

转载于:https://www.cnblogs.com/ceci/archive/2009/02/25/1398177.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值