问题
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.
回答1:
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
来源:https://stackoverflow.com/questions/51673403/cannot-execute-breakpoint-inside-stored-procedure-from-vs-2017