How to debug MySQL stored routines

from the Artful MySQL Tips List


MySQL Workbench does not have a stored routine debugger. What are our options?

Open source solutions

Stubs: At key points in the code, add Select statements which execute if a debug flag or parameter is set.

Data driven stubs: Give the routine a debug flag or parameter, and code it to save variable names and values to the debug table when the debug flag is set. For mature examples of this approach see ...

http://gilfster.blogspot.co.at/2006/03/debugging-stored-procedures-in-mysql.html
http://www.bluegecko.net/mysql/debugging-stored-procedures/

Stored procedure debugger in MySQL Connector/NET: Version 6.6 has introduced a stored procedure debugger which works inside Visual Studio. "Functions and triggers will be enabled in a future build."

Commercial solutions

dbForge for MySQL: http://www.devart.com/dbforge/mysql/studio/code-debugger.html

Mydebugger: http://mydebugger.com/



Return to the Artful MySQL Tips page