Starting the Debugger
T-SQL Debugger can only be run from within SQL Query Analyzer. Once started, the debugging interface occupies a window within that application.
Starting the debugger
There are two methods for starting the debugger. Each method requires that the target procedure be created and stored in a SQL Server database. The first method employs Object Browser. The second method relies on the Object Search tool.
To start the debugger from Object Browser
- On the Tools menu, click Object Browser.
- In Object Browser, click the Objects tab.
- Double-click to open the database in which your procedure is stored.
- Double-click to open the Stored Procedures folder.
- Right-click the stored procedure to debug. A Context menu will appear.
- Select Debug from the Context menu.
To start the debugger from Object Search
- On the Tools menu, click Object Search.
- In the Object Search window, enter the appropriate search parameters required to locate the procedure you are looking for. Click the Find Now button to display matches.
- In the results pane of the Object Search window, right-click the name of the stored procedure you wish to debug. A Context Menu appears.
- Select Debug from the Context Menu.
When the Transact-SQL Debugger starts, a dialog box appears, prompting you to set the values of input parameter variables. It is not mandatory that these values be set at this time. You will have the opportunity to make modifications once the debugger's interface appears. In the dialog box, click Execute to continue with your session.
Note SQL Query Analyzer does not support multiple instances of the debugger. Attempting to debug a second stored procedure will prompt you to cancel the currently active debugging session.
Due to connection constraints, it is not possible to create a new query while the debugger window is in the foreground. To create a new query, either bring an existing query window to the foreground or open a new connection to the database.