visual-studio 如何在 Visual Studio 中启用存储过程的调试?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/282876/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 09:54:47  来源:igfitidea点击:

How to enable debugging of stored procedures in visual studio?

sql-servervisual-studiodebugging

提问by evilHyman

Ok, this is driving me nuts.

好吧,这让我发疯。

I've done just about everything I can to enable step through debugging of stored procedures of a sql server 2005 database.

我已经做了我能做的几乎所有事情来启用调试 sql server 2005 数据库的存储过程。

http://arjunachith.blogspot.com/2007/05/debugging-stored-procedures-debug.html

http://arjunachith.blogspot.com/2007/05/debugging-stored-procedures-debug.html

http://msdn.microsoft.com/en-us/library/zefbf0t6(vs.71).aspx

http://msdn.microsoft.com/en-us/library/zefbf0t6(vs.71).aspx

My currents setup:

我的电流设置:

  1. visual studio 2008 SP1
  2. SQL server 2005 express database (yes you can debug on this)
  3. DEV database on my localmachine with "root" login as sysadmin
  1. 视觉工作室 2008 SP1
  2. SQL Server 2005 express 数据库(是的,您可以对此进行调试)
  3. 我本地机器上的 DEV 数据库,以“root”身份登录为 sysadmin

All I want to do is right click on a stored proc in my server explorer in VS 2008 and see "step into stored procedure". I've done all I can and I can't see that. I'm just trying to access a local database on my local machine, I've created an account

我想要做的就是在 VS 2008 的服务器资源管理器中右键单击存储过程,然后查看“步入存储过程”。我已经尽我所能,但我看不到。我只是想访问本地机器上的本地数据库,我已经创建了一个帐户

采纳答案by GalacticCowboy

What edition of VS2008 are you running? I just checked on Pro and Team System, and I get that option on both; I also have C# Express, and it doesn't give this option. (I don't have Standard, so can't check that one...)

你运行的是什么版本的VS2008?我刚刚检查了 Pro 和 Team System,我在两者上都得到了那个选项;我也有 C# Express,它没有提供这个选项。(我没有标准,所以不能检查那个......)

[edit] From the second link you provided (MSDN), on the right-hand side there's a link for VS2008 that indicates it only applies to Pro and Team.

[编辑] 在您提供的第二个链接 (MSDN) 中,右侧有一个 VS2008 链接,表明它仅适用于 Pro 和 Team。

回答by Sethupathi

Just select your connection in Server Explorer and right click on that, and select Allow SQL/CLR Debugging

只需在服务器资源管理器中选择您的连接并右键单击它,然后选择 Allow SQL/CLR Debugging

回答by Uneverno

To do sql debugging in managed code or visual studio, visual studio should be configured to enable sql server deubugging. this link helps you with direct solution http://support.microsoft.com/kb/316549and http://msdn.microsoft.com/en-us/library/aa984533(v=vs.71).aspxbut the edition of the visual studio should be considered.Pls refer this http://msdn.microsoft.com/en-us/library/ms165038(v=vs.80).aspx.

要在托管代码或 Visual Studio 中进行 sql 调试,应将 Visual Studio 配置为启用 sql server 调试。此链接可帮助您直接解决http://support.microsoft.com/kb/316549http://msdn.microsoft.com/en-us/library/aa984533(v=vs.71).aspx但版本应该考虑 Visual Studio 的。请参考这个http://msdn.microsoft.com/en-us/library/ms165038(v=vs.80).aspx

Apparently, You might not get Debug tab though the versions are pro/team and if its a web application project. To make it work, you need to select web tab-->scroll the screen very down-->Get 3 options as in below image.

显然,尽管版本是 pro/team 并且它是一个 Web 应用程序项目,但您可能不会获得 Debug 选项卡。要使其工作,您需要选择 Web 选项卡--> 向下滚动屏幕--> 获取 3 个选项,如下图所示。

View The Image For Help

查看图像寻求帮助