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
15 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_
  • 3
4 Comments
 
LVL 51

Expert Comment

by:Mark Wills
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
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_
Thank you Mark !

toshi_
0
 
LVL 51

Expert Comment

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

Cheers,
Mark Wills
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
add projects t working set in maven 2 16
Row insertion failed. Array 5 45
Adding items to a C# list incrementally 5 28
Query for timesheet application 3 15
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
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 …

791 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