debug::caller(3tcl)
β¨ NAME β¨
debug::caller β it's the debug narrative caller situation, bestie. That's it, that's the name π
π¦ SYNOPSIS π¦
package require Tcl 8.5 9
package require debug::caller ?1.2?
debug caller ?args...?
πΈ DESCRIPTION πΈ
π API
debug caller ?args...?β okay so here's the tea π
This one is so handy when you want it sitting in a tag-specific prefix, because then it just automatically drops caller info into every single use of that tag. No cap. Or you can pop it into a message instead, when it's only certain spots that need that level of detail. Situational, but iconic π
Beyond that β and this is the fun part β it recognizes the various internal forms of method calls that the snit OO system generates, and it rewrites them back into their original form, purely for readability. Because readability is the moment. And it does the exact same glow-up for TclOO β¨
Now, if you do pass args, those get treated as the integer indices of the command arguments you do not want showing up in the output. Whatever args you point at get replaced by * instead. The main anticipated use case here is yeeting out arguments you already know are gonna be carrying big ol' Tcl values β think long lists, large dictionaries, etc. β so they don't absolutely overwhelm the narrative π protect the vibe, always.
π BUGS, IDEAS, FEEDBACK π
Okay, real talk: this document, and the package it describes, will undoubtedly contain bugs and other problems. It's giving humble, but fr fr π
Please report those in the category debug of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist](http://core.tcl.tk/tcllib/reportlist).
Also please report any ideas for enhancements you have for either the package and/or the documentation. We want them all, every last one π«Ά
When you're proposing code changes, please provide unified diffs β that is, the output of diff -u. That's the format, bestie, don't freestyle it.
Also note: attachments are strongly preferred over inlined patches. You can make an attachment by going to the Edit form of the ticket immediately after it's created, and then using the left-most button in the secondary navigation bar. Slay π
β KEYWORDS β
debug, log, narrative, trace
π CATEGORY π
debugging, tracing, and logging
π COPYRIGHT π
Copyright (c) 2012-2015, Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page, babe π it's tcllib version 1.2, page debug::caller(3tcl), brought to you with love and absolutely zero skips πβ¨
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2012-2015, Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms