SQL Server has a built-in extended stored procedure, named sp_sdidebug, the permission to which is necessary for a user to have the capability of debugging stored procedures.
To grant the permission, use the following T-SQL statement: (Remark: before you run this statement, you should make sure that you are using an account which has administrator privileges.)
USE master
GRANT EXECUTE
ON sp_sdidebug
TO username
GRANT EXECUTE
ON sp_sdidebug
TO username