Solved

Is it possible to debug a Store Procedure on MSSMS after a unitTest that calls it  from VS ?

Posted on 2017-03-16
4
70 Views
Last Modified: 2017-03-20
Hello everyone,

I know how to debug a storeProc in MSSMS by launching the sp call from mssms with a breakpoint in it.
I know how to debug  in VS.....

but i dont know how to use both at the same time :
Is it possible to launch debug for a unittest  that call a SP and have MSSMS that  take over with the debug  and get back to VS  ?
If it's possible how can i do that ? i would appreciate a recipe or a link to it.

thank you in advance.

toshi
0
Comment
Question by:toshi_
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 51

Expert Comment

by:Mark Wills
ID: 42054570
My short answer is "Not Easily". Too many limitations, so never really explored.

My long answer is (what I have always done) to edit the stored procedure to write a log. Then go through the log after the event.

My humble answer is... Not as far as I have ever needed to (use edit and write log). But, according to https://support.microsoft.com/en-au/help/316549/how-to-debug-stored-procedures-in-visual-studio-.net seems like you can. See Option 2.

But will hang around to see what other experts have to offer.
0
 
LVL 51

Accepted Solution

by:
Mark Wills earned 500 total points
ID: 42054581
Oh, and in VS2010 you used to connect to Server Explorer but in more recent, you now connect to SQL Server using Sql Server Object Explorer.

There is a good example here : https://www.codeproject.com/articles/1079275/debug-stored-procedures-in-visual-studio-and-ssms 

Seems like I need to brush up a bit more :) Still has a few limitations though...
0
 

Author Comment

by:toshi_
ID: 42056017
Thank you Mark !

toshi_
0
 
LVL 51

Expert Comment

by:Mark Wills
ID: 42056759
A pleasure, and thank you very much for your question :)

Cheers,
Mark Wills
0

Featured Post

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will learn how to fix  “Cannot install SQL Server 2014 Service Pack 2: Unable to install windows installer msi file” error ?
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question