远程调试 Web 部件

发布于 2024-09-27 20:25:43 字数 650 浏览 1 评论 0原文

我无法让 Visual Studio 2008 远程调试器命中断点。

我有两个 VMWare 虚拟机。

其中一台托管 SharePoint MOSS 2007 共享服务和中央管理,并且还包含 Visual Studio 2008 Professional。我正在使用 WSPBuilder 来构建和部署我的 Web 部件。

另一台机器是 Web 前端,我已将远程调试文件夹复制到 C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger 并启动远程调试监视器。

我在 Visual Studio 中创建了基本的 WSPBuilder 项目,并添加了带有默认“Hello SharePoint”代码的 Web 部件功能,然后使用 WSPBuilder 菜单进行部署,在站点级别激活它并将其添加到测试 SharePoint 页面。

我从 Visual Studio 附加到位于 Web 前端的 w3wp.exp,在那里我可以看到远程调试器监视器告诉我它已成功连接。

现在无论我做什么 VS 都不会停在断点处。此外,断点图标显示消息“不会命中断点。尚未为此文档加载任何符号。”

在这种情况下,.pdb 从哪里加载?我必须做什么才能让它成功加载 .pdb 文件?

感谢您的帮助。

I am having trouble getting Visual Studio 2008 remote debugger to hit break points.

I have two VMWare virtual machines.

One hosts the SharePoint MOSS 2007 Shared Services and Central Admin and has Visual Studio 2008 Professional on it as well. I am using WSPBuilder to structure and deploy my web part.

The other machine is a Web Front End and I have copied the remote debugging folder to C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\Remote Debugger and started up the Remote Debugging Monitor.

From Visual Studio I created the basic WSPBuilder project and add a Web Part Feature with the default "Hello SharePoint" code and then Deploy using the WSPBuilder menu, activate it at the site level and add it to a test SharePoint page.

From Visual Studio I attach to the w3wp.exp located on the Web Front End where I can see the Remote Debugger Monitor telling me it successfully connected.

Now no matter what I do VS Does not stop at the breakpoint. Furthermore the breakpoint icon displays the message "The Break Point will not be hit. No symbols have been loaded for this document."

In this scenario where is the Where does the .pdb load from? What must I do to get it to load the .pdb file successfully?

Thanks for the help.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

浮华 2024-10-04 20:25:43

对于托管代码调试,VS2008 在远程机器上查找符号,而不是在本地机器上。因此,您的 PDB 必须可供 Web 前端盒上运行的 msvsmon.exe 实例访问(通过共享,或通过将 PDB 复制到该计算机)。

For managed code debugging, VS2008 looks for symbols on the remote machine rather than the local box. So your PDB's have to be accessible to the msvsmon.exe instance running on the Web Front end box (either via a share, or by copying the PDBs over to that machine).

枯叶蝶 2024-10-04 20:25:43

WSPBuilder 部署的程序集是在发布模式下构建的,并且不包含调试符号。为了加载调试符号,您需要在调试模式下构建解决方案/项目并覆盖虚拟机内 bin/GAC 中的程序集。调试程序集可以在 Visual Studio 项目文件夹的 bin/Debug 下找到。

如果您在覆盖 GAC 程序集时遇到问题,请暂时停止与 SharePoint 网站关联的应用程序池。

希望这有帮助!

The assemblies deployed by WSPBuilder are built in Release mode and do not contain debugging symbols. In order to load the debugging symbols, you need to build the solution/projects in debug mode and overwrite the assemblies in the bin/GAC within the vm. The debug assemblies can be found in your visual studio project's folder under bin/Debug.

If you're having problems overwriting the GAC assemblies, temporarily stop the Application Pool associated with the SharePoint site.

Hope this helps!

何以笙箫默 2024-10-04 20:25:43

要加载调试符号,请检查以下几点...

  1. 如果远程计算机上的调试可执行文件是 32 位 exe,则应在远程计算机上运行的远程调试器也应该是 32 位版本即使远程计算机的操作系统是 64 位计算机,也可以使用“Visual Studio 2008 远程调试器”。
    如果远程计算机上的调试可执行文件是 64 位,则应使用“Visual Studio 远程调试器 (x64)”。

  2. 应可从安装 Visual Studio 的计算机访问正在远程调试的可执行文件的路径,并且可执行文件的 .pdb 文件应存在于该路径中。

To load the debugging symbols, please check for the following points...

  1. If your debugging executable on the remote machine is a 32 bit exe, then the remote debugger that should be running on the remote machine should also be 32 bit version of "Visual Studio 2008 Remote Debugger" even though the remote machine's OS is a 64 bit machine.
    If the debugging executable on the remote machine is 64 bit, then one should use of the "Visual Studio Remote Debugger (x64)".

  2. The path of the executable being remotely debugged should be accessible from the machine where Visual Studio is installed and the .pdb file of the executable should be present in that path.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文