Debugging Engine

This topic describes the debug mechanism that is used in Fusion for MySQL

Debug Engine Overview

To debug stored procedures, functions, and triggers, the debug engine should be deployed on the server. The debug engine is a server part of debugging technology. It is a set of stored procedures, functions, and tables, which are stored in cr_debug database.

If debug engine is not deployed to the server, you will be asked whether to deploy debug engine, when compiling stored routine with debug info. You can deploy or redeploy it at any time by selecting Deploy Debug Engine on the Debug menu.

To remove debug engine from the server, just remove the cr_debug database.

To deploy debug engine you need to have PROCESS global privilege and the following privileges on cr_debug database (or global ones):

  • SELECT
  • CREATE
  • DROP
  • CREATE ROUTINE

Compiling Stored Procedures, Functions, and Triggers for Debugging

To debug stored procedures, functions, and triggers you must compile it with debug information. To do it right-click the procedure, function or trigger in Database Explorer and select Compile for Debugging. In case a procedure, function or trigger is not compiled for debugging, you will be prompted to compile it as soon as you run debugger.

To remove debug info from the stored procedure, function or trigger, right-click ones in Database Explorer and select Compile on the shortcut menu.

Compiling with debug information adds additional statements, required for debug, to the procedure, function or trigger. Fusion for MySQL hides them when opening a procedure, function or trigger compiled with debug information. These statements don’t affect stored routine logic. Compiling without debug information removes these statements from the stored routine.