简体   繁体   English

如何在SQL Server 2008 R2上使用Visual Studio 2010调试SharePoint存储过程?

[英]How to debug SharePoint stored procedures with Visual Studio 2010 on SQL Server 2008 R2?

I'm looking for a way to debug the stored procedures that SharePoint uses. 我正在寻找一种调试SharePoint使用的存储过程的方法。 I would like to get an idea what is happening on the database side. 我想知道数据库方面正在发生什么。 The COM Exception message is pig-useless (0x8004005, which means generic problem - hurrah) and I would like to see what is going wrong on the other side as I can't muck around in the COM Component itself. COM Exception消息是无用的(0x8004005,这意味着通用问题-hurrah),我想看看另一边出了什么问题,因为我无法在COM Component本身中搞乱。 While I followed the description on how to setup VS for debugging the SQL Server they somehow all assume I can call the stored proc myself. 当我按照有关如何设置VS来调试SQL Server的说明进行操作时,它们都以某种方式假定我可以自己调用存储的proc。 I'm looking for either a Debugger.break()-style T-SQL call or something similar. 我正在寻找Debugger.break()风格的T-SQL调用或类似的东西。 Any ideas? 有任何想法吗?

You can debug a stored procedure on SERVER only and NOT on CLIENT. 您只能在SERVER上调试存储过程,而不能在CLIENT上调试存储过程。

If sql server is installed on server, and in your local PC you have only SQL Server Management Studio is installed, you can not debug stored procedure in your local PC. 如果在服务器上安装了sql server,并且在本地PC中仅安装了SQL Server Management Studio,则无法在本地PC中调试存储过程。

You need to go to server and there you can debug stored procedure in SQL Server Management Studio like this: 您需要转到服务器,然后可以在其中调试SQL Server Management Studio中的存储过程,如下所示:

  1. Open stored procedure in SQL Server Management Studio. 在SQL Server Management Studio中打开存储过程。
  2. Click "Start Debugging" from Debug menu. 从“调试”菜单中单击“开始调试”。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM