[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: You may need to add #include directives for the following .h files
From: |
Gary V. Vaughan |
Subject: |
Re: You may need to add #include directives for the following .h files |
Date: |
Mon, 28 Jan 2013 10:16:15 +0700 |
Hi Bruce,
On 28 Jan 2013, at 08:32, Bruce Korb <address@hidden> wrote:
> Also, I don't know how you use $debug_cmd,
It's all in the comments :)
# Allow overriding, eg assuming that you follow the convention of
# putting '$debug_cmd' at the start of all your functions, you can get
# bash to show a function call trace with:
#
# debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name
debug_cmd=${debug_cmd-":"}
> but for me this works very well:
>
> PS4='>$FUNCNAME> '
>
> You always know which function was active for every xtrace entry.
Good tip! Thanks :)
Once upon a time I also wrote a full interactive debugger for bash (full
disclosure: I cribbed a lot of it from the ORA ksh book, with permission),
which I think is still included in the distribution. However, I've taken
to writing bug-free code these days, so haven't used it in a very very
long time :*)
Cheers,
--
Gary V. Vaughan (gary AT gnu DOT org)