StreamBase Studio's SB Trace Debugger perspective provides a way to review and analyze runtime trace files generated while an application was running. You can analyze trace files any time after the application has stopped.
Trace debugging is the ability to debug through a trace file, line by line, with automatic highlighting of the current place in the associated EventFlow module. Trace debugging lets you interactively trace individual tuples through each operator in an application, to determine exactly why the tuple's fields changed and where.
A link on the top right of the Trace Debugger view pops up a reminder of the color coding for the highlighting of tuples in the view. That color code is:
You can generate trace files for this purpose in two ways:
-
Enable trace file generation for your application as described in Runtime Tracing and Creating Trace Files. Then run your application, either providing it test data in a feed simulation, or running with live data. When the application stops, switch to the SB Trace Debugger perspective and open the generated trace file.
-
Launch your application in Studio in Trace Debug mode.
Trace Debug mode constitutes a third launch mode for running applications in Studio, in addition to Run and Debug modes. To run In Trace mode:
-
Start with your application's EventFlow, StreamSQL, or Deployment File Editor open, with the application typechecked and free of errors. It is best to have a feed simulation prepared and ready to run.
-
Click the
Trace Debugger button in the
Studio toolbar, or invoke → → .
-
Studio runs the application normally, and automatically starts recording a trace file for the main application in the default container. The status button in the lower left corner of the Studio window shows a message like the following:
-
Send tuples to the application manually or with a feed simulation.
-
When you stop the application, Studio automatically switches to the SB Trace Debugger perspective, with the newly-recorded trace file already loaded. You can now use this perspective to follow the progress of a single tuple through your application.
You can edit and save Trace Debugger launch configurations in the same way as Run and Debug launch configurations.
