A script is misbehaving. I need to know who calls that script, and who calls the calling script, and so on, only by modifying the misbehaving script.
This is similar
The simplest script which returns a stack trace with all callers:
i=0; while caller $i ;do ((i++)) ;done