Debugging stored procedure under test efficiently

83 views
Skip to first unread message

Test User

unread,
Jan 20, 2016, 4:09:43 PM1/20/16
to tSQLt
When dbo.MyProc fails, what is the easiest way to debug it using the Transact-SQL debugger? Right now, I set a breakpoint on:
EXEC tSQLt.Run 'MyClass.test MyProc';
then I step into it and set a breakpoint on
EXEC tSQLt.Private_Run @TestName, @TestResultFormatter;
and so on until I get to tSQLt.Private_RunTest:
IF (@SetUp IS NOT NULL) EXEC @SetUp;
EXEC (@Cmd);     -- evaluates as EXEC ('MyClass.test MyProc');

I step  into the EXEC call and finally I am inside dbo.MyProc and I can set my watches, breakpoints, etc..

Is there a way tio set a breakpoint in a stored procedure *before* calling the procedurein the debugger?r
       

Francois Mongeau

unread,
Apr 19, 2022, 8:39:14 PMApr 19
to tSQLt
newbie here: Any answer to this ?
Reply all
Reply to author
Forward
0 new messages