|
Text Editor | 602SQL Development and Management Client | SQL Server Runtime Profiling |
The debug system is integrated into the editor of the 602SQL Client. The debugger simplifies error location and removal in procedures and triggers. The debugger allows you to trace a program, look deep into subprocedures, evaluate expressions, watch/change variable values, and more.
Two clients on the same server are used for debugging (the debug client, who calls the stored procedures or executes triggers, and the debugging client, who may trace and watch the activity of the debug client). The debug client is executed/terminated at the start/end of the debug process. The debug client does not consumes a licence.
Routine profiling (e.g. looking for parts of code that run slow) is closely related to debugging.
Open the procedure you want to debug in the editor and execute the Run action (from the toolbar or from the pop-up menu). 602SQL will try to compile the procedure. If an error occurs during compilation, you will be notified and the debug mode will not run. If compilation is successful, a window with the procedure parameter list appears with the checkbox Run in debug mode. If you check this box, a debug session is starts. This session stops at the first line of the procedure. The debug menu appears and now you can debug the program.
You always see the line that is to be executed in the editor window (blue line color and an arrow). A line with a breakpoint is marked in red. The layout of the client interface windows will change according to the layout set for debug mode.
The source code cannot be changed during the debug session. You can, however, search for strings in the code the same way you do in the editor.
You can debug and trace procedures on the server even when the procedure is called by a client that does not allow debugging (e.g. a compiled EXE file). The process is as follows:
It is necessary to keep these things in mind when debugging routines on a server:
List of topics:
Text Editor | 602SQL Development and Management Client | SQL Server Runtime Profiling |