rogalmic / vscode-bash-debug

Bash shell debugger extension for VSCode (based on bashdb)
MIT License
222 stars 26 forks source link

"Stop Debugger" crashes VSCode irrespective of program being debugged #184

Open monochromec opened 1 year ago

monochromec commented 1 year ago

In addition to the details for issue, please provide us Executables information and Debug output unless you have confidence that they don't help us.

Executables

Version of bash-debug: (can be checked in: ctrl+shift+X or command+shift+X -> INSTALLED: Bash Debug) v0.3.9 Output of following commands (on windows, execute them in Command Prompt or PowerShell):

where bash
# if `code` not found on macOS, follow the instructions in:
# https://code.visualstudio.com/docs/setup/mac
code --version: 1.78.2
  bash -c 'uname -a; for P in bash bashdb cat mkfifo pkill; do echo ---; which -a $P; command $P --version; done'
Darwin xxx.lan 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 arm64
---
/opt/homebrew/bin/bash
/bin/bash
/bin/bash
GNU bash, version 5.2.15(1)-release (aarch64-apple-darwin22.1.0)
Copyright (C) 2022 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
---
bash: line 1: bashdb: command not found
---
/bin/cat
/bin/cat
cat: illegal option -- -
usage: cat [-belnstuv] [file ...]
---
/usr/bin/mkfifo
/usr/bin/mkfifo
mkfifo: illegal option -- -
usage: mkfifo [-m mode] fifo_name ...
---
/opt/homebrew/bin/pkill
/usr/bin/pkill
/usr/bin/pkill
pkill: illegal option -- e
Usage: pkill [-<signal>] [-finvVx] [-g <pgrplist>] [-G <gidlist>] [-P <ppidlist>] [-s <signal>] [-t <termlist>] [-u <euidlist>] [-U <uidlist>] [<pattern>]

## Debug output
{
    "version": "0.2.0",
    "configurations": [
              {
            "type": "bashdb",
            "request": "launch",
            "args": ["XXX"],
            "name": "Bash-Debug (simplest configuration)",
            "program": "${file}"
        }
    ]
}

Details

When debugging a program with "Bash Debug" enabled, a "Stop Debugging" command issues via the GUI reproducibly crashes VSCode regardless of the debugging configuration, ie. what program is being debugged (Python, Bash, etc). Disabling the extension prevents this crashing. Logs in ~/Library/Application Support/Code/logs are inconclusive as they don't contain any pointers to the root cause.

More than happy to provide additional information if required.