Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When starting debugger, debug console shows "stty: standard input: Inappropriate ioctl for device" #188

Open
ioogithub opened this issue Oct 2, 2023 · 3 comments

Comments

@ioogithub
Copy link

Executables

Version of bash-debug: v0.39

which bash
/usr/bin/bash

bash -c 'uname -a; for P in bash bashdb cat mkfifo pkill; do echo ---; which -a $P; command $P --version; done'

Linux gram 6.3.1-060301-generic #202304302031 SMP PREEMPT_DYNAMIC Mon May  1 00:41:22 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux`
---
/usr/bin/bash
/bin/bash
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 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
---
/usr/bin/cat
/bin/cat
cat (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://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.

Written by Torbjorn Granlund and Richard M. Stallman.
---
/usr/bin/mkfifo
/bin/mkfifo
mkfifo (GNU coreutils) 8.32
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://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.

Written by David MacKenzie.
---
/usr/bin/pkill
/bin/pkill
pkill from procps-ng 3.3.17

Debug output

stty: standard input: Inappropriate ioctl for device
stty: standard input: Inappropriate ioctl for device
/home/user/vscode-oss/extensions/rogalmic.bash-debug-0.3.9-universal/bashdb_dir/command/source.sh: line 41: /dev/stdin: No such device or address

Details

New user here, I have been looking for a way to debug bash scripts for a long time. I have installed the plugin and followed the first gif posted here: https://open-vsx.org/extension/rogalmic/bash-debug. I also read the guide here: https://code.visualstudio.com/docs/editor/debugging.

I created a launch.json, pasted the code. When I press the start debug button. I get these errors in the console. I have tried debugging several scripts, I always get these errors. Am I missing something?

I am on ubunu jammy and running VSCodium version 1.82.0 release 23250:

Version: 1.82.0
Release: 23250
Commit: 13ae69686c4390a9aee7b71b44337eb488319f26
Date: 2023-09-07T18:51:47.499Z
Electron: 25.8.0
ElectronBuildId: undefined
Chromium: 114.0.5735.289
Node.js: 18.15.0
V8: 11.4.183.29-electron.0
OS: Linux x64 6.3.1-060301-generic

Thank you for this plugin! Hopefully I can get it working.

@fancyerii
Copy link

I have the same error message. But It can still work.

@fancyerii
Copy link

when I debug, it can stop at breakpoint, but some variables value is wrong displayed.

declare -A mydict

while read key value; do
    if [[ -z $key ]] || [[ -z $value ]] ; then
        break
    fi
    mydict["$key"]="$value"
done

I have typed "k1 v1", but it display wrong value. But the program is still correct.

image

@Lslightly
Copy link

Lslightly commented Mar 10, 2025

add "terminalKind": "integrated" to the launch.json might help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants