This example shows how to debug a stored function in dbForge Studio for SQL Server. Use provided scripts to create sample objects in your test database.
Use the script available in Debugging a Stored Procedure to the procedure used in the sample below.
Use the script below to create the GetFirstDayOfMonth function that returns the first day of a calendar month.
To debug the Microsoft SQL Server function:
In Database Explorer, choose a test database.
Press F11 or click Step Into to get inside the GetFirstDayOfMonth stored function.
Note
You may ignore stepping through the function by clicking the Step Over button. In this case you will continue stepping through the stored procedure.
Step through the GetFirstDayOfMonth function until you exit back to the stored procedure, and continue to the end.
Notes
- You may get back to the stored procedure code by clicking the Step Out button. In this case you will continue stepping through the stored procedure.
- You may click the procedure in the Call Stack window to get back to the parent code.
Download dbForge Studio for SQL Server and try it absolutely free for 30 days!