'''Hacking on The Core''' — it's good for the soul! ** Some Debugging Macros ** [PYK] 2015-04-25: I'm still learning the ropes of [C], but I'll throw these here anyway. They came in handy recently to debug an I/O/[thread] issue. ======c #define tdebug(statement) do { \ fprintf(stderr ,"%p: %s\n" ,Tcl_GetCurrentThread() ,(statement)); \ } while (0) #define tcdebug(statePtr, statement) do { \ fprintf(stderr ,"%p: chan %s: %s\n" ,Tcl_GetCurrentThread() ,(statePtr->channelName) ,(statement)); \ } while (0) ====== <> The Tcl Core | Debugging