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.