{"id":6151,"date":"2013-03-21T11:15:03","date_gmt":"2013-03-21T09:15:03","guid":{"rendered":"http:\/\/code.openark.org\/blog\/?p=6151"},"modified":"2013-03-29T10:15:52","modified_gmt":"2013-03-29T08:15:52","slug":"mysql-stored-routines-debugger-debugging-api-sneak-preview-ii-video","status":"publish","type":"post","link":"https:\/\/code.openark.org\/blog\/mysql\/mysql-stored-routines-debugger-debugging-api-sneak-preview-ii-video","title":{"rendered":"MySQL Stored Routines Debugger &#038; Debugging API: sneak preview II, video"},"content":{"rendered":"<p>This is the <strong>2nd<\/strong> sneak preview of <a href=\"http:\/\/code.google.com\/p\/common-schema\">common_schema<\/a>&#8216;s <strong>rdebug<\/strong>: debugger &amp; debugging API for MySQL stored routines (<a href=\"http:\/\/code.openark.org\/blog\/mysql\/mysql-stored-routines-debugger-debugging-api-sneak-preview-video\">see <strong>1st<\/strong> preview here<\/a>).<\/p>\n<p><em>rdebug<\/em> will be released as part of <em>common_schema<\/em>, free and open sourced.<\/p>\n<p>In this sneak preview I present:<\/p>\n<ul>\n<li>Compiling multiple routines with debug info<\/li>\n<li>Starting\/stopping a debug session<\/li>\n<li>Step-over, step-in, step-out<\/li>\n<li>Showing stack trace<\/li>\n<li>Showing the next-statement to execute<\/li>\n<li>Viewing and manipulating local routine variables<\/li>\n<li>Misc. meta routines<\/li>\n<\/ul>\n<h4>The quick technical overview<\/h4>\n<p><em>rdebug<\/em> is a server-side mechanism, itself written in MySQL stored routines. It manipulates your routines by injecting debug code (easily removed afterwards).<\/p>\n<p>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.<\/p>\n<p><em>rdebug<\/em> is controlled by an <strong>API<\/strong> of stored routines. This means any GUI tool may choose to use <em>rdebug<\/em> 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&#8217;s all in your server.<\/p>\n<h4>A video is worth a thousand blogs<!--more--><\/h4>\n<p>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.<\/p>\n<p>I can&#8217;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.<\/p>\n<div class=\"jetpack-video-wrapper\"><iframe loading=\"lazy\" title=\"common_schema&#039;s rdebug: MySQL stored routines debugger &amp; debugging API, preview ii\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/ynqLmK77XjE?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/div>\n<p>The code is not yet released, but will be, shortly, under an open source license.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is the 2nd sneak preview of common_schema&#8216;s rdebug: debugger &amp; 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 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"enabled":false},"version":2}},"categories":[5],"tags":[67,97,99,59],"class_list":["post-6151","post","type-post","status-publish","format-standard","hentry","category-mysql","tag-common_schema","tag-debug","tag-rdebug","tag-stored-routines"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2bZZp-1Bd","_links":{"self":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6151","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/comments?post=6151"}],"version-history":[{"count":15,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6151\/revisions"}],"predecessor-version":[{"id":6179,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/posts\/6151\/revisions\/6179"}],"wp:attachment":[{"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/media?parent=6151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/categories?post=6151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/code.openark.org\/blog\/wp-json\/wp\/v2\/tags?post=6151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}