How to debug a stored procedure from ObjectContext.ExecuteFunction

  • Thread starter Thread starter Juan Dent
  • Start date Start date
J

Juan Dent

Hi,

I am working in ADO.NET 3.5 with ObjectContext and mapping stored procedures
to be called via the ExecuteFunction member method. I open the stored
procedure from the server explorer, from an open connection, and I place a
breakpoint in it. When I execute my client code and call ExecuteFunction, I
cannot get the debugger to step into the stored procedure code. What am I
missing?
 
Hi Juan,

Could you please check the following before debugging?

1. To step from Visual Studio code into a stored procedure, you must enable
SQL Debugging in the Project Properties on the Debugging page.
2. To step through stored procedure code, you must set a breakpoint in the
stored procedure itself. Otherwise, debugging steps over the stored
procedure and the window for the stored procedure does not open.
3. Right-click the connection in the Server Explorer you want to debug, and
on the shortcut menu, click Application debugging.

This is documented at KB: How to debug stored procedures in Visual Studio
.NET (http://support.microsoft.com/kb/316549) and How to: Enable SQL Server
2005 Debugging (http://msdn.microsoft.com/en-us/library/s0fk6z6e.aspx)

if you still cannot debug, please let me know:
1. Which version of SQL Server are you debugging?
2. Are you debugging remote SQL Server?
3. Is your windows account the sysadmin of SQL Server?

Please try the solution above and let me know if they work for you. Thanks.

Regards,
Hongye Sun ([email protected], remove 'online.')
Microsoft Online Community Support

Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
(e-mail address removed).

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subscriptions/aa948868.aspx#notifications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/default.aspx?target=assistance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
Back
Top