从VS 2017无法在存储过程中执行断点 [英] Cannot execute breakpoint inside stored procedure from VS 2017

查看:177
本文介绍了从VS 2017无法在存储过程中执行断点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我敢肯定我遗漏了一些非常明显的东西,但是它在逃避我。



我正在调试开发计算机上SQL Server 2012数据库中的存储过程。我在本地计算机上使用VS 2017 Professional。我可以通过输入参数值来设置断点并通过SQL Server Object Explorer调试存储过程。



如何:我想使用IISExpress从运行在VS 2017中的Web应用程序调试存储过程。我这样设置:




  • 我对Server Explorer连接和Web应用程序都使用相同的连接字符串


  • 用户在SQL Server中具有管理员权限


  • 在属性页中在Web应用程序中,我已经调试器检查了 ASP.NET和 SQL Server


  • 我为任何CPU上的调试设置了配置管理器。


  • 运行应用程序时,我在调用存储过程之前和之后设置了一个断点。




当我运行应用程序时,它会在调用存储过程之前的断点处中断,但会跳过它到下一个应用程序断点。存储过程中的断点有一个空心圆圈,并显示消息
’该断点当前不会被命中。目前无法绑定SQL断点。



我知道我可以简单地在Web应用程序内部中断,获取存储过程的参数值并从SQL Server运行它对象资源管理器可以逐步执行代码,但是我不必这样做。



任何帮助将不胜感激。

解决方案

我用一个简单的示例对其进行了测试,我可以使用VS2015达到断点,但在VS2017中不起作用,因此



如果可能,我建议您直接将反馈发布到开发者社区网站:



https://developercommunity.visualstudio.com/spaces/8/index.html


I'm sure that I'm missing something very obvious, but it is escaping me.

I am trying to debug a stored procedure in a SQL Server 2012 database on a development machine. I am using VS 2017 Professional on my local machine. I am able to set a breakpoint and debug the stored procedure via SQL Server Object Explorer by feeding in a parameter value.

HOWEVER: I want to debug the stored procedure from my web application running in VS 2017 using IISExpress. I'm set up thusly:

  • I am using the same connection string for both Server Explorer connection as well as the web application.

  • The user has admin privileges in SQL Server

  • In the property pages for the web application, I have the debuggers checked for "ASP.NET" and "SQL Server"

  • I have the configuration manager set for Debug on Any CPU.

  • When I run the application, I set a breakpoint before and after the call to the stored procedure.

When I run the application, it breaks at the breakpoint before the call to the stored procedure, but skips right around it to the next application breakpoint. The breakpoint in the stored procedure has is a hollow circle with the message 'The breakpoint will currently not be hit. Unable to bind sql breakpoint at this time. Object containing the breakpoint not loaded.'

I know that I can simply break inside the web application, grab the parameter value for the stored procedure and run it from the SQL Server Object Explorer to step through the code, but I shouldn't have to do that.

Any help would be appreciated.

解决方案

I test it with a simple sample, I could hit the breakpoint with VS2015, but not work in VS2017, so it would be a feedback.

If possible, I suggest you post a feedback to the developer community site directly:

https://developercommunity.visualstudio.com/spaces/8/index.html

这篇关于从VS 2017无法在存储过程中执行断点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆