Test script is VS code with bash Debug extension all updated running with WSL2 on windows 11
Whatever the script every time there is a Read command in it got stuck with non error generated. I have to stop the debug manually.
Please note that if I run the script in the terminal it works just fine.
!/bin/bash
declare -a users
while true; do
echo "Enter a username (or press q to quit): "
read username
if [ "$username" == "q" ]; then
break
fi
users+=($username)
done
echo "Users in the list:"
for user in "${users[@]}"; do
echo " $user"
done
Test script is VS code with bash Debug extension all updated running with WSL2 on windows 11 Whatever the script every time there is a Read command in it got stuck with non error generated. I have to stop the debug manually. Please note that if I run the script in the terminal it works just fine.
!/bin/bash
declare -a users while true; do echo "Enter a username (or press q to quit): " read username if [ "$username" == "q" ]; then break fi users+=($username) done echo "Users in the list:" for user in "${users[@]}"; do echo " $user" done
Debug output
Enter a username (or press q to quit):
My
launch.json
may looks like:"version": "0.2.0", "configurations": [ { "type": "bashdb", "request": "launch", "name": "Bash simple", "cwd": "${workspaceFolder}", "program": "${file}", //"terminalKind": "integrated", "terminalKind": "debugConsole", "showDebugOutput":false, "trace": false } ] }
Details
Details goes here.