If you set an early point at an early stage, you can go through until you find an error.
As heads-up, however, you need to look for a case where you put a string in varchar that is longer than varchar allows.
So, if you have varcahr (5) and you are trying to set it as "mylongtext", you will get this error.
To do this in SSMS, right-click on SP and select EXECUTE TO> New Window. This will create the execution code for you:
DECLARE @RC int DECLARE @LocationID int DECLARE @SiteID int -- TODO: Set parameter values here. EXECUTE @RC = [MY-DB].[dbo].[P_SELECT_RetrieveToolTips] @LocationID ,@SiteID GO
Move the cursor to the EXECUTE statement and press F9 to add a breakpoint.
Then click play (debug). When he stops at the breakpoint, press F11 to go to SProc and then F10 to go along each line.
source share