Store procedure

How do I debug a store procedure in MySQL ?

I have a store procedure with 6 inputs. I want to debug this store proc .

How do I do it ? Is there any tool available which could help me ?

My SQL version: 5

Not sure if you are willing to spend any money, but a google search produced this and it looks promising.

There are several ways of doing it as long as you are debugging in the development environment. You can enable the MySQL general query log which logs every SQL statement to a log file and you go through these. Alternatively create a table log_table (for logging text information) and within your stored procedure perform INSERT statements into this log_table with the stored procedure parameter values, also at various points within the flow control of the stored procedure perform other INSERT statements to show how it is behaving.