Stored procedure debugging in MySQLThu, Nov 1, 2012 in Databases
I was just skimming through the latest “Meet the Experts” podcast from Oracle, whose topic is debugging stored routines in MySQL. The tl;dr (tl;dl?) version is if you’re working with Windows and .NET, you can install a Visual Studio plugin that lets you debug stored routines in the server via the .NET connection libraries. That’s pretty nice, for those who are using that platform. The podcast is only a few minutes, so if you’re interested, by all means listen to it, or take a look at the documentation.
The ideal way to debug stored routines would be an API in the server, but that doesn’t exist. Nevertheless, I remembered having seen some sort-of implementations of debugging at times in the past. My memory was that they used some workarounds to inject debugging code into the routines, using some things like special tables to communicate the values of variables and so on. I searched my quick-snippets file and did a brief web search, and turned up a lot more options than I remembered! In addition to the feature explained in the Oracle podcast, these products also offer stored procedure debugging of one type or another:
- Hopper (beta demo)
- The Illatis Stepin plugin for Eclipse
- Devart dbForge
- And, if you want to do it yourself, here’s a pretty thorough walk-through from BlueGecko
I haven’t used any of the above, and I’m not endorsing them, but I thought it might be helpful to have a list in one place. Did I miss any? Please add more information in the comments.
About The Author
Baron is the founder and CEO of VividCortex. He is the author of High Performance MySQL and many open-source tools for performance analysis, monitoring, and system administration. Baron contributes to various database communities such as Oracle, PostgreSQL, Redis and MongoDB.