debug::caller(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

✨ 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 (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