602SQL Documentation Index  


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.

Starting Debug Mode

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.

Attaching to a Running Client

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:

  1. Run the debugging client (602SQL Development Client), open the procedure you want to debug in the editor and insert a breakpoint.
  2. Connect with the client (e.g. the EXE file).
  3. Select the Attach the Debugger to a Running Client action from the server pop-up menu and select the client from the list of possible clients (the client layout will switch to debug mode).
  4. Invoke the execution of any procedure by the debug client - the program will stop on the first line of this precedure (you can insert breakpoint now as well). Continue and then the program will stop on the breakpoint and the debugging client allows you to debug the procedure.
  5. When you terminate and disconnect from the server, the debug mode of the client is terminated as well.

Debug Properties

It is necessary to keep these things in mind when debugging routines on a server:

List of topics: