Debugging SQL Script

Last modified: October 18, 2023

This topic explains how to debug SQL scripts using debugger integrated into dbForge Studio for MySQL.

To debug an SQL script:

  1. Open the required script in the SQL editor.
  2. On the Debug menu, click Start.
  3. Set a breakpoint for your statement by clicking in the gray margin next to the SET statement.

If a statement is invalid, an error message appears in the error list, though debugging process continues. The debugging of an SQL script can be suspended by clicking the Pause command. You can also use different step commands of the Debug menu to trace an SQL script.

To debug an SQL script, you don’t need any special privileges, except for the privileges, required for execution of the script statements.

You can use the Watches window to view server and session variables during SQL script debugging.