Administering SQL Server

Single-Stepping Traces

Rather than replay all events in a trace to completion, SQL Profiler allows you to replay a trace in the following ways:

Single stepping is useful for debugging the events captured in a trace. For example, you can create a trace monitoring the execution of all batches submitted. By replaying the events in the trace one at a time (single stepping), you can determine the effects of each batch as they occur, allowing you to debug your code. This is much more effective than placing large amounts of debug code between batches. Debug code generally creates more output that needs to be separated from the actual results generated, and that must be correctly removed when debugging is complete.

To replay a single event at a time

Profiler

Profiler

To replay to a breakpoint

Profiler

Profiler

To replay to the cursor

Profiler

Profiler