Path: csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nntp.club.cc.cmu.edu!169.228.66.3.MISMATCH!ihnp4.UCSD.Edu!usenet.stanford.edu!not-for-mail From: Chet Ramey Newsgroups: gnu.bash.bug Subject: Re: Debian: bash --debugger doesn't start the debugger Date: Tue, 13 Oct 2015 09:10:10 -0400 Lines: 26 Approved: bug-bash@gnu.org Message-ID: References: <561C150C.6080403@periapt.co.uk> Reply-To: chet.ramey@case.edu NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: usenet.stanford.edu 1444741918 23218 208.118.235.17 (13 Oct 2015 13:11:58 GMT) X-Complaints-To: action@cs.stanford.edu Cc: chet.ramey@case.edu To: Nicholas Bamber , 403304@bugs.debian.org, Matthias Klose , bug-bash@gnu.org, Oleksandr Moskalenko Envelope-to: bug-bash@gnu.org X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 In-Reply-To: <561C150C.6080403@periapt.co.uk> X-Junkmail-Status: score=10/60, host=mpv6.cwru.edu X-Junkmail-Whitelist: YES (by domain whitelist at mpv2.tis.cwru.edu) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 129.22.105.37 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Received-Bytes: 3032 X-Received-Body-CRC: 4241195328 Xref: csiph.com gnu.bash.bug:11646 On 10/12/15 4:16 PM, Nicholas Bamber wrote: > My investigations indicate that it is still true that as per Debian bug > report (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=403304) > --debugger does NOT start the debugger UNLESS the debugged script has a $1. We discussed this in a thread on bug-bash back in April: http://lists.gnu.org/archive/html/bug-bash/2015-04/msg00183.html This discussion references an earlier bug report concerning whether the --debugger option should produce an error if the bashdb script is not installed. There is also an issue with bashdb misbehaving when run in an interactive shell; that was the reason for the check of $1 in the first place. Part of that thread explains why a check of $0 is not correct: since $0 is always set, a check for it has no effect. The final change that solves both problems went into the bash development branch in early May, and will be in bash-4.4. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/