Unable to hit breakpoint Mixed mode debugging C# SQL

  • Thread starter Thread starter Ash
  • Start date Start date
A

Ash

Hi all,
I have a C# web application which calls a number of stored procedures.
I wish to step into the stored procedures while debugging i.e "Mix-mode
debugging":

I have completed the following steps:

Configured DCOM
Connected to database via Server Manager (I can see the SQL server and the
stored procedure)
Enabled SQL Debugging in the project properties

The Debugging components are installed and I think they are working because
I can right click the stored procedure from the server manager and "Step
Into Stored procedure" successfully!

The problem is that I set my breakpoint within the stored procedure run the
project then a

?
appears in the breakpoint when I hover over it I get this message:

"The breakpoint will not currently be hit. Unable to bind SQL breakpoint at
this time. Object containing the breakpoint not loaded."

Ive tried everything I can find can you please help me out !

Thanks in advance

Best Regards
Ashley Rajaratnam
 
I have found that the easiest way to run this is to open the stored
procedure and choose execute from the right click menu. Then, fill in the
values from the application by setting watches. Run until you hit the
breakpoint for the call to the sproc and then execute the sproc, filling in
values.

In the future, this will get less painful, as the next version of SQL Server
is reported to be more CLR friendly. The current system, however, leaves a
bit to be desired. Note, however, that it is better than previous
incarnations of Visual Studio.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

**********************************************************************
Think Outside the Box!
**********************************************************************
 
Thanks for the reply!

Just to clarify are you saying that it isn't possible to step from VS.net C#
through to a stored procedure breakpoint?

I had it up and running with VS 6.0 (sure it was an add-on nevertheless it
worked!) don't understand why that feature wasn't developed into VS.NET...
:(

In fact this MS article suggests the opposite


T-SQL and Managed or Unmanaged Code
You cannot step into T-SQL from managed or native code or into managed or
native code from T-SQL. To get around this limitation, set a breakpoint in
your SQL code. You can also use Run to Cursor to reach a desired point,
without using a breakpoint.

http://msdn.microsoft.com/library/en-us/vsdebug/html/vchowapplicationdebugging.asp?frame=true




Did I misunderstand what you were saying?

Thanks - Ash
 
Back
Top