vscode-bash-debug: unrecognized option -- -
Executables
Version of bash-debug: bash-3.1-0.09
Output of following commands (on windows, execute them in Command Prompt or PowerShell):
where bash:
what? Do you mean which bash?
code --version:
1.24.1
24f62626b222e9a8313213fb64b10d741a326288
x64
bash -c 'uname -a; for P in bash bashdb cat mkfifo pkill; do echo ---; which -a $P; command $P --version; done':
Darwin EEDWARDSLT-MAC.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
---
/bin/bash
GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin17)
Copyright (C) 2007 Free Software Foundation, Inc.
---
/usr/local/bin/bashdb
Bourne-Again Shell Debugger, release bash-3.1-0.09
Copyright 2002, 2003, 2004, 2006, 2007 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
bashdb: cannot read program to debug: Bc:hL:nqt:T::x:XYV.
---
/bin/cat
cat: illegal option -- -
usage: cat [-benstuv] [file ...]
---
/usr/bin/mkfifo
mkfifo: illegal option -- -
usage: mkfifo [-m mode] fifoname ...
---
/usr/bin/pkill
pkill: illegal option -- -
usage: pkill [-signal] [-ILfilnovx] [-F pidfile] [-G gid]
[-P ppid] [-U uid] [-g pgrp]
[-t tty] [-u euid] pattern ...
Debug output
13:03:45, 2018-6-22
From client: initialize({"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"bashdb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"en-us"})
To client: {"seq":0,"type":"response","request_seq":1,"command":"initialize","success":true,"body":{"supportsConditionalBreakpoints":false,"supportsConfigurationDoneRequest":false,"supportsEvaluateForHovers":true,"supportsStepBack":false,"supportsSetVariable":false}}
From client: launch({"type":"bashdb","request":"launch","name":"Bash-Debug (hardcoded script name)","cwd":"/Users/eedwards/Documents/dev/bash-util","program":"/Users/eedwards/Documents/dev/bash-util/bash-util/build/lib/bash-util-1.0/test","args":[],"showDebugOutput":true,"trace":true,"pathBash":"bash","pathBashdb":"bashdb","pathCat":"cat","pathMkfifo":"mkfifo","pathPkill":"pkill","__sessionId":"38047af9-b61e-4e71-bb4f-cd757dda6cbd"})
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Bourne-Again Shell Debugger, release bash-3.1-0.09\n"}}
Bourne-Again Shell Debugger, release bash-3.1-0.09
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stdout","output":"Copyright 2002, 2003, 2004, 2006, 2007 Rocky Bernstein\nThis is free software, covered by the GNU General Public License, and you are\nwelcome to change it and/or distribute copies of it under certain conditions.\n\n"}}
Copyright 2002, 2003, 2004, 2006, 2007 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
To client: {"seq":0,"type":"event","event":"output","body":{"category":"stderr","output":"bashdb: cannot read program to debug: Bc:hL:nqt:T::x:XYV.\n"}}
bashdb: cannot read program to debug: Bc:hL:nqt:T::x:XYV.
Details
bashdb works fine when ran from the command line directly:
→ bash --debugger -- test
(/Users/eedwards/Documents/dev/bash-util/build/lib/bash-util-1.0/test:3):
3: source ./bash-util.bash
bashdb<0> q
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 22 (8 by maintainers)
Thanks for the response. I must use the version I’m using. If you read the readme in the sourceforge repo for bashdb, you will see that the version of bashdb correlates to the version of bash. It’s not designed to always be ran with the latest version, thus I believe a project like this would benefit from knowing how to invoke various versions.
Thanks
Get Outlook for iOShttps://aka.ms/o0ukef
From: Wataru Ashihara notifications@github.com Sent: Saturday, June 23, 2018 2:21:15 AM To: rogalmic/vscode-bash-debug Cc: Ethan Edwards; Mention Subject: Re: [rogalmic/vscode-bash-debug] unrecognized option – - (#70)
@eedwards-skhttps://github.com/eedwards-sk
On bashdb@7504a22https://sourceforge.net/p/bashdb/code/ci/7504a22/, the behavior of getopts_long was changed, which was included on bashdb-4.0-0.4.
Could you try bashdb-4.4-0.92https://sourceforge.net/projects/bashdb/files/bashdb/ (not 4.4-0.93 or later because of #69https://github.com/rogalmic/vscode-bash-debug/issues/69)? I think it can be installed without --disable-getopt.
I’ll investigate it more from next week… 😃
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/rogalmic/vscode-bash-debug/issues/70#issuecomment-399645436, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ag-68Y--xT6H5DClT5jIGaLhESja_00Rks5t_exrgaJpZM4U0Nl7.
Hey @rogalmic thanks for your response
Here’s the output:
I believe this confirms what I suspected, that the long option names (e.g.
--quiet) are not supported.I haven’t dug into your codebase yet, so I apologize for ‘taking a stab at a solution’ without any real knowledge, but perhaps we could add a setting in
launch.jsontouseShortOptionNamesor similar?Thanks in advance!
edit: also, as an amusing easter egg… with short options bashdb still prints
Use --help for option help., which doesn’t work! haha!