DebugWare Patterns (Part 1)

These are patterns for troubleshooting and debugging tools: solutions for common recurrent problems. Forthcoming book

DebugWare: The Art and Craft of Writing Troubleshooting Tools 

which I’m writing with Kapildev Ramlal, the author of several Citrix tools, will discuss them in sufficient detail. The first pattern is named:

API Query

Software products use various API and external interfaces to query data or get notifications from operating system environment. Their behaviour depends on API return values or output parameters that are not always logged or logged with insufficient detail. In order to reproduce or diagnose problems an engineer can write a small API Query tool that will periodically or asynchronously query the same set of API and log their input and output data. If the problem happens with the product at some point this additional log will help in problem identification and resolution.

Examples:

TSUserLog
WindowHistory

I’ve set up a dedicated page for DebugWare patterns:

http://www.dumpanalysis.org/blog/index.php/debugware-patterns/

- Dmitry Vostokov @ DumpAnalysis.org

3 Responses to “DebugWare Patterns (Part 1)”

  1. Dave Agans Says:

    Dmitry,

    Good stuff, I’m looking forward to the book. I once implemented a command-line oriented API tester for a videoconferencing standards API, and a bunch of developers starting running scripts against it to test all the stuff behind it. They had usable videoconferencing “applications” running just by calling DOS batch files.

    You might want to reference my book “Debugging” somewhere in your patterns book. The 9 rules (and corollaries) in “Debugging” are at a more universal level than typical design patterns, but they are patterns just the same. Your API tester would come under the general rules “Check the plug” (check assumptions about everything including upstream and downstream API operation), Quit Thinking and Look, and Divide and Conquer.

  2. Dmitry Vostokov Says:

    Thanks! I’m ordering your book now :-)

  3. Dmitry Vostokov Says:

    Got the book in the post today. Started reading and will post a review :-)

Leave a Reply

You must be logged in to post a comment.