I am working on SQL Azure and have written some stored procedures in it. Now while executing that stored procedure using EXEC query from the database i need to debug it to find the error if any. Is there any way to do so in SQL Azure?
Note:- I am using SQl Azure on SQL Server 2008 R2.
You can also export Azure SQL Databases to a local developer environment and do debugging locally. Finally, if you need to debug on Production use PRINT or SELECT statements of T-SQL to watch the values of variables or display intermediate result sets.
To debugging SP, go to database->Programmability->Stored Procedures-> right click the procedure you want to debug->select Debug Procedure.
Normally you debug T-SQL logic on a local SQL Server database; that's the easiest way to debug. Running the stored proc locally allows you to step through your code and debug it easily.
If for some reason the issue only shows up in SQL Azure, you may have to add some statements that log what's going on while the stored procedure is being called and work your way up to the issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With