Skip to content

# Tag: rdebug

## Taking common_schema’s rdebug to a test-drive

MySQL common_schema rdebug Stored routines April 9, 2013

This is a simple step-by-step introduction to rdebug: Debugger and Debugging API for MySQL Stored Routines, as part of common_schema.

In other words: let me take you through the steps for debugging your stored routines on your own server. We will step into, step over, step out, modify variables, set a breakpoint, run to breakpoint…

Command line geeks, this one’s for you. GUI lovers, this is actually an API; I am hoping for someone wrap it up with a plugin for your favorite GUI editor.

#### Requirements:

- Install common_schema 2.0 or above (at this time of writing 2.0.0-alpha is released).
- Get sample data & routine file [download id=”4″ format=”1″]
- mysql> SOURCE rdebug_demo.sql_.txt
  - You should now have a table called color_count in the test database, along with two routines: review_colors() and review_single_color().
- Open two sessions. We call them the debugger session and the worker session. The worker session will execute the routine; the debugger session will control it.

#### Walk-through: preparation

Walk this thing with me. We will alternate between the debugger and the worker. Continue reading » “Taking common_schema’s rdebug to a test-drive”

## common_schema 2.0.0-alpha: rdebug, GPL

MySQL common_schema Development Open Source rdebug Stored routines tools April 9, 2013April 9, 2013

A new release for common_schema: an alpha version of rdebug: MySQL Debugger and Debugging API is now included with common_schema.

With a different license in mind for rdebug, common_schema changes license to GPL (2 or above).

common_schema 2.0 is ready for download. All things rdebug, it is alpha — otherwise it’s a stable release.

#### rdebug

I’m very happy to release this alpha version of rdebug, and urge everyone to try it out.

The idea is to have an open, free, server side debugger and debugging API for MySQL stored routines. To elaborate:

- It’s server side by that it’s implemented by stored routines. Not by a connector; not an emulator; not a GUI tool hack. The entire functionality lies within common_schema, a schema in your server.
- It’s a debugger: you can debug your own stored routines (with limitations)
- It’s a debugging API: there’s a distinct specification and a set of calls which makes for a debugging process
- It’s open since the source code is yours to browse.
- It’s free as in free beer.
- It’s free as it makes you independent of a specific debugger. It provides an API that anyone can use. You can run the API yourself from the command line; or plugins for your favorite GUI editor can be developed to use this API.

On a separate blog post I will take you to a rdebug test drive.

As always, nothing is released before extensive documentation is in place.

I’d love to get input on this. Continue reading » “common_schema 2.0.0-alpha: rdebug, GPL”

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

MySQL common_schema debug rdebug Stored routines March 21, 2013March 29, 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 Continue reading » “MySQL Stored Routines Debugger & Debugging API: sneak preview II, video”