I'm sure if you're reading this question you are already familiar with my love for
pgfkeys. However, it is absolutely impossible to debug:
\tracingmacros is a total mess, with every key expanding to dozens of complex internal macros. I would like to be able to debug it the same way I can debug a program built by hand using
\def: watch the keys absorb their arguments, expand their values or execute their code, and proceed to the next key. I don't care how
\pgfk@try or whatever is defined, only that it looks for a key and does or doesn't find it, acting accordingly.
Currently, I debug by intimidation:
\tracingmacros=1 and lots of scrolling plus a bit of pattern recognition for the repetitive macro noise. It's too much to hope that there is some way of coercing
pgfkeys into producing nicer output; it would require the author to have hand-coded a selectively populated call stack. I'm wondering, though, if anyone else familiar with this package could tell me how they figure out what's going on with their keys.
Related: How to best debug LaTeX? (by Yossi Farjoun; not coincidentally, this question is also really his, from a recent chat conversation.)