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

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

ReSignal

https://mariadb.com/resources/blog/quickly-debugging-stored-procedures-functions-triggers-and-events-with-resignal/

Visual Studio debugger

https://dev.mysql.com/doc/visual-studio/en/visual-studio-debugger.html

Commercial solutions

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

Mydebugger: http://mydebugger.com/

Last updated 29 Oct 2020


Return to the Artful MySQL Tips page