Debugging an SQL Script with IDERA SQL Debugger
Go Up to Using the IDERA SQL Debugger
After you open a debugging session and enter any required input parameters, you can begin working with your script in the IDERA SQL Debugger.
Debugging an SQL Script
To debug a SQL Script, do the following:
- On the Debug menu, click one of the SQL Debugger options (Step Into, Step Over, and so forth) or click Go.
- Note: You can monitor the progress of your debug session in the Variables window.
- On the Debug menu, select Breakpoint.
- OR
- Press F9.
- Note: When you set a breakpoint, the Call Stack window shows what was called before the breakpoint.
- Note: You can use the Run To Cursor option to test the lines of code between a breakpoint and your cursor (indicated by the yellow arrow in the DDL Editor).
To check your variables:
- In the DDL Editor, click a variable in your script and drag it to the Watch window.
- In the Watch window, change the value of the watch variable, and then click Go to run your script and see the results of the new value.
To check a record in stored objects:
- Drag the record to the Watch window.
- In the Watch window, change the value of the record, then click Go to run your script and see the results of the new value.
To check the dependencies:
- In the Dependency Tree window double-click the target dependent object to extract the code into a new DDL Editor.
- Step through the script while monitoring the Dependency Tree Window.
- When you finish debugging the script, click Close or Exit.
- The T-SQL Debugger DDL Editor closes.
- Note: When you exit a debug session and reenter it, the IDERA SQL Debugger for MSSQL retains any watch variables or breakpoints you have set.