How to debug in Management Studio

  • With SQL Server 2000, one can debug a stored procedure in SQL Analyzer by right click the stored procedure and select the debug. In Management Studio, debug is not among the pulldown menu when right click a procedure. How can one do debug in SQL Server 2005 ?

    Thanks

    George

  • It is not currently present in SSMS, so far as I am aware. This has raised some hate and discontent if you do a search on "debug ssms" in your favorite search engine you'll see some other threads where this is discussed.

    K. Brian Kelley
    @kbriankelley

  • I installed the old SQL2000 tools including Query Analyzer.  However I cannot get debugging to work on a simple tsql procedure.

    This is a MAJOR flaw with SQL2005.  Who wants to install something on a QA/staging server that is not going to be on a production server, to troubleshoot?  There are many times that the QA staff will step through code with Query analyzer to assist in the resolution to the issue.  They will not be able to do so now, since we want the QA/staging environment the same as production.  And we are not about to install the IDE on production.

     

    So the list of useful missing items is increased by one:

    ·       Taskpad

    ·        Ability to quickly script permissions on stored procedures

    ·        Ability to quickly see disk space in database properties

    ·        Time of creation of stored procedures

    ·        Debug TSQL stored procedures

    [font="Arial"]Clifton G. Collins III[/font]

  • All you need is the "SQL Server Business Intelligence Development Studio" (included in the SQL 2005 installation DVD) or "Visual Studio 2005".  Create a connection using the Server Explorer.  Then, open connection > Stored Procedures and right click on the stored procedure you want to debug, then click on Step Into Stored Procedure.  The rest is just like Query Analyzer.

    Make sure you have EXEC rights on the extended stored procedure sp_sdidebug located in master > Programmability > Extended Stored Procedures > System Extended Stored Procedures > dbo.sp_sdidebug.

    Good luck!

    [font="Verdana"]Sal Young[/font]
    [font="Verdana"]MCITP Database Administrator[/font]

  • Sal,

    I'm currently looking at the permissions required by Developers to debug Stored Procedures using Visual Studio 2005.

    I've seen some sources which seem to indicate that you need to be a member of the sysadmin role; however I don't think (hope) that this is the case.

    I see you mention having exec rights on the extended sp "sp_sdidebug" however I cannot find any such sp (I'm using developer addition). I can find "sp_enable_sql_debug". Is this the proc you mean?

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply