FAQ about Debugger for MySQL
Last modified: October 18, 2023
Here are common questions about MySQL debugging engine and answers to them.
What does ‘Deploy Debug Engine’ command do exactly?
The Deploy Debug Engine command creates a database named cr_debug with a set of stored procedures, functions, and tables required for the debugger.
To deploy debug engine your account needs to have PROCESS global privilege and the following privileges on cr_debug database (or global ones):
- SELECT
- CREATE
- DROP
- CREATE ROUTINE
What happens with the procedure after executing the ‘Compile for Debugging’ command?
When a user invokes the Compile for Debugging command application inserts special trace calls (referencing the cr_debug database) into the procedure code. They are required to perform step-by-step SQL debugging. These trace calls are not displayed when you edit the procedure in the internal editor of dbForge Studio for MySQL (dbForge Fusion for MySQL).
Does the debugger for MySQL slow down the server?
Debug engine does not affect server performance unless you start debugging session.
A debugging session (started when you step in into a specific procedure), indeed, can slow down the MySQL server. This happens because executing trace calls from stored routine’s code within debugging session puts additional workload onto the server.
A stored routine with debug information when invoked outside the debugging session executes slightly slower because trace calls are still performed though they actually do nothing.
MySQL does not perform any sort of stored code compilation, so what does the ‘Compile’ command do?
The Compile command removes SQL debug information from stored routine’s code. If it does not contain code debug information compilation does nothing.
How can I remove debug information from all procedures in my database at once?
To remove debug information from stored procedures:
1. In Database Explorer, expand the Procedures (Functions, Triggers) folder.
2. Select all procedures (functions, triggers) by using Shift + Left Mouse Click.
3. Open the popup menu and execute the Compile command.
How can I remove debug engine from MySQL server for production?
Debug engine itself does not affect other databases on the server. To remove it you need to drop the cr_debug database.
Note: If you drop the cr_debug database without removing debug information from procedures you debugged you won’t be able to execute them until you clear debug information.
Debugging of stored procedures is available in dbForge Studio for MySQL (Enterprise, Professional, and Standard editions).
Want to find out more?
Overview
Take a quick tour to learn all about the key benefits delivered by dbForge Studio for MySQL.
All features
Get acquainted with the rich features and capabilities of the tool in less than 5 minutes.
Request a demo
If you consider employing this tool for your business, request a demo to see it in action.
- FAQ about Debugger for MySQL
- What does ‘Deploy Debug Engine’ command do exactly?
- What happens with the procedure after executing the ‘Compile for Debugging’ command?
- Does the debugger for MySQL slow down the server?
- MySQL does not perform any sort of stored code compilation, so what does the ‘Compile’ command do?
- How can I remove debug information from all procedures in my database at once?
- How can I remove debug engine from MySQL server for production?