Limitations on Debugger Commands and Features
This topic applies to:
Visual Studio Ultimate |
Visual Studio Premium |
Visual Studio Professional |
Visual Studio Express |
---|---|---|---|
The Visual Studio Transact-SQL debugger provides many but not all common debugging features. Transact-SQL debugging supports most debugger commands, such as setting breakpoints and stepping. You can view the values of variables and passed parameters in the Locals window. You can also drag expressions to the Watch window to track them as you step through or run the procedure.
However, Transact-SQL debugging happens in a very different environment, due to some basic characteristics of SQL Server itself. This difference results in some limitations that apply to Transact-SQL debugging.
General Limitations when Debugging with SQL Server
You cannot use Edit and Continue.
You cannot use Run to Cursor in the Call Stack window.
You cannot use Break while a Transact-SQL statement is processing.
The output of SQL PRINT statements does not appear in the debugger or the Database Output pane.
You cannot use AutoRollback in Visual Studio. If you reproduce a bug that changes data, you can lose the bug because your data has changed.
A number of windows either are not available or do not provide any capability. They are:
Memory
Registers
Disassembly for Transact-SQL
Transact-SQL Debugging Limitations
Breakpoint conditions and filters are not supported.
Because SQL Server does not have true memory or registers, you cannot use the Memory window or Registers window.
You cannot use Set Next Statement to change the execution sequence. You must follow the flow control and statement order in the Transact-SQL code. As a workaround, you can put control statements around blocks of Transact-SQL code and change variable values.
You cannot access any .NET Framework variables or properties from inside a Transact-SQL object.
The Immediate window is displayed, but you cannot do anything useful with it, such as setting a variable to a value, or querying the database.
A number of windows either are not available or do not provide any capability. They are:
Disassembly
Threads
Registers
Processes
Modules