sharepoint - 调试 SharePoint 2007 代码

标签 sharepoint debugging moss

如何调试 SharePoint 2007 代码?由于 SharePoint 在远程服务器上运行,并且我正在 Windows xp 机器上开发(将必要的 .dll 文件复制到我的 GAC 中),我没有找到简单的调试方法。断点不起作用等。

我想出的最好方法是在 web.config 文件中启用页面跟踪,在我的代码中编写跟踪消息,并在需要调试时访问 trace.axd。

有没有人有更好的调试建议?我错过了什么吗?

最佳答案

来自 Andrew Connell's blog post就此主题而言:

Attaching the debugger to GAC'd assemblies: "Why aren't my breakpoints being hit?!?!" Ever been there? Me too... what a PITA that is! What's going on? Well, the assemblies are in the GAC and the Visual Studio debugger can't see the debugging symbols (aka: *.pdb). Unless you've gone through the trouble of setting up a symbol store where all your PDBs are going, you'll need to put the debugging symbols in the same location as the assembly. The trick is finding the folder that contains your DLL in the GAC.

The c:\windows\assembly folder is not a real folder, it's a virtual folder. To get to the REAL folder, do the following:

  • Start » Run
  • %systemroot%\assembly\gac [ENTER]

This will open the GAC folder. Now, poke around until you find a folder that looks like this (you might need to jump up one folder and dive into the MSIL folder): [assembly file name -.DLL extention][assembly version in format of > #.#.#.#]__[assembly public key token].

When you find that folder, open it up and you'll see your assembly. Copy the PDB file to that folder and then attach the debugger for some debugging joy!

关于sharepoint - 调试 SharePoint 2007 代码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/145361/

相关文章:

Sharepoint 默认列表项详细信息 View

c# - 无法访问站点共享点中文件的名称

javascript - 使用 Visual Studio 调试第三方 Javascript?

c# - 我如何知道您已登录 Sharepoint 网页?

sharepoint - MOSS - 您会选择哪一个 - 120 多个附加列,还是单独的链接列表?

sharepoint - 如何在 Sharepoint 日期和时间(今天)中仅显示年份字段

html - CSS 伪类 :hover in content editor webpart does not function correctly in ie8/ie7

c# - .NET Windows 服务的奇怪问题

c# - #if DEBUG 在我的 VS 2010 中似乎不起作用

sharepoint - 如何将评论添加到现有 Sharepoint 2007 新闻网站的新闻文章中?