none
Unable to debug T-SQL code in SSMS 2008 - Remote debugging Dialog pops up

    Question

  • Hi,

    I'm trying to debug some t-sql code using the debug feature of SSMS. SSMS is running as a normal user (ie. not ran as administrator), when i try to debug by pressing alt-f5 a popup asks for firewall permissions in order to debug, the server i'm connectiong to is "(local)" . i assumed that remote debugging isn't used when debugging the local sql server - and regardless of what option i choose in the popup  i'm unable to debug. 

    I was able to unblock remote debugging however when running SSMS as admin but i'm still a bit confused as to why remote debugging is involved at all?

    I do not feel very comfortable opening up system ports.

    Tuesday, May 03, 2011 7:57 AM

Answers

  •  Hello ,

     

    As per article http://technet.microsoft.com/en-us/library/cc646024(SQL.100).aspx, there is no configuration requirements to run the Transact-SQL debugger when SQL Server Management Studio is running on the same computer as the instance of the SQL Server Database Engine.

     

    To troubleshoot this issue can you try the following steps.

                    1. Create a simple test proc and see you are able to debug.

                    2. Make sure clients tools are installed sucessfully.

                    3. Can you enable the following configuration as in above article and see you are able to debug.

    On the computer that is running the instance of the Database Engine, in Windows Firewall, specify the following information:

     

    Add TCP port 135 to the exceptions list.

     

    Add the program sqlservr.exe to the exceptions list. By default, sqlservr.exe is installed in C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\Binn, where InstanceName is MSSQLSERVER for the default instance, and the instance name for any named instance.

     

    If the domain policy requires network communications to be done through IPsec, you must also add UDP port 4500 and UDP port 500 to the exception list.

     

    On the computer that is running SQL Server Management Studio, in Windows Firewall, specify the following information:

     

    Add TCP port 135 to the exceptions list.

     

    Add program ssms.exe (SQL Server Management Studio) to the exceptions list. By default, ssms.exe is installed in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.

     

     

    Thank You

     

    Jayaprakash JO - MSFT

    Wednesday, May 11, 2011 3:54 PM

All replies

  • Hi Membrane,

    The requirements to start the Transact-SQL debugger are as follows:

    • SQL Server Management Studio must be running under a Windows account that is a member of the sysadmin fixed server roll.
    • The Database Engine Query Editor window must be connected by using either a Windows Authentication or SQL Server Authentication login that is a member of the sysadmin fixed server role.
    • The Database Engine Query Editor window must be connected to an instance of the SQL Server 2008 Database Engine or later. You cannot run the debugger when the Query Editor window is connected to an instance that is in single-user mode.

    >>SSMS is running as a normal user (ie. not ran as administrator)
    The user must be a member of the sysadmin fixed role.

    >>I was able to unblock remote debugging however when running SSMS as admin but i'm still a bit confused as to why remote debugging is involved at all?
    Is there any linked server involved in the T-SQL? If that is the case, it could be the reason why remote debugging involved.

    Best Regards,
    Stephanie Lv

    • Proposed as answer by Stephanie Lv Tuesday, May 10, 2011 5:25 AM
    • Unproposed as answer by Stephanie Lv Tuesday, May 10, 2011 8:48 AM
    Wednesday, May 04, 2011 10:12 AM
  •  Hello ,

     

    As per article http://technet.microsoft.com/en-us/library/cc646024(SQL.100).aspx, there is no configuration requirements to run the Transact-SQL debugger when SQL Server Management Studio is running on the same computer as the instance of the SQL Server Database Engine.

     

    To troubleshoot this issue can you try the following steps.

                    1. Create a simple test proc and see you are able to debug.

                    2. Make sure clients tools are installed sucessfully.

                    3. Can you enable the following configuration as in above article and see you are able to debug.

    On the computer that is running the instance of the Database Engine, in Windows Firewall, specify the following information:

     

    Add TCP port 135 to the exceptions list.

     

    Add the program sqlservr.exe to the exceptions list. By default, sqlservr.exe is installed in C:\Program Files\Microsoft SQL Server\MSSQL10.InstanceName\MSSQL\Binn, where InstanceName is MSSQLSERVER for the default instance, and the instance name for any named instance.

     

    If the domain policy requires network communications to be done through IPsec, you must also add UDP port 4500 and UDP port 500 to the exception list.

     

    On the computer that is running SQL Server Management Studio, in Windows Firewall, specify the following information:

     

    Add TCP port 135 to the exceptions list.

     

    Add program ssms.exe (SQL Server Management Studio) to the exceptions list. By default, ssms.exe is installed in C:\Program Files\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE.

     

     

    Thank You

     

    Jayaprakash JO - MSFT

    Wednesday, May 11, 2011 3:54 PM