MySQL Stored Routines Debugger & Debugging API: sneak preview II, video

March 21, 2013

This is the 2nd sneak preview of common_schema's rdebug: debugger & debugging API for MySQL stored routines (see 1st preview here).

rdebug will be released as part of common_schema, free and open sourced.

In this sneak preview I present:

  • Compiling multiple routines with debug info
  • Starting/stopping a debug session
  • Step-over, step-in, step-out
  • Showing stack trace
  • Showing the next-statement to execute
  • Viewing and manipulating local routine variables
  • Misc. meta routines

The quick technical overview

rdebug is a server-side mechanism, itself written in MySQL stored routines. It manipulates your routines by injecting debug code (easily removed afterwards).

To debug a routine you will need two connections: one is the debugging connection, and the other is the worker connection. The debugger connection attaches itself to the worker connection, where your routines execute.

rdebug is controlled by an API of stored routines. This means any GUI tool may choose to use rdebug as its routine debugging mechanism. Your are not bound to a specific tool, a specific OS or framework. You may choose to invoke the API via command line, if you like; it's all in your server.

A video is worth a thousand blogs

The following video demonstrates the debugging process of two stored procedures, one invoking the other. This allows for step-in/over/out commands, stack trace analysis, and of course variable inspection and modification.

I can't say I caught the hang of capturing my desktop and editing the movie (doing it one on Linux and once on Mac), so please excuse any poor quality video/sound.

The code is not yet released, but will be, shortly, under an open source license.

  • Alex kim

    so cool

  • massimo

    hi! great but the link to the first part does not work.

  • @massimo - thanks! fixed

Powered by Wordpress and MySQL. Theme by