bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bash --debugger does nothing if debug script not installed


From: Chet Ramey
Subject: Re: bash --debugger does nothing if debug script not installed
Date: Sun, 23 Nov 2014 13:58:51 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.2.0

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/21/14 9:31 PM, Eric Blake wrote:

> $ bash --debugger foo
> bash: debug script /usr/bin/bashdb: file not found
> 
> to give me a heads up that I need to install bashdb.  Would it make
> sense to make the explicit use of --debugger be fatal if a debugger
> start file is configured but not present?

I think a better change is to report the error on opening the file,
then turn off debugging mode but allow script execution to continue.
Something like this:

$ bash --debugger foo
foo: /usr/local/share/bashdb/bashdb-main.inc: No such file or directory
foo: warning: cannot start debugger; debugging mode disabled
hello

Chet
- -- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (Darwin)
Comment: GPGTools - http://gpgtools.org

iEYEARECAAYFAlRyLmsACgkQu1hp8GTqdKsgOwCfb3SiB1jq4R9LzjI50NbsonAC
LL4An2u9/xUTvrDJjsYrJxqp2u0VUTVE
=EziL
-----END PGP SIGNATURE-----



reply via email to

[Prev in Thread] Current Thread [Next in Thread]