vscode-bash-debug icon indicating copy to clipboard operation
vscode-bash-debug copied to clipboard

Passing empty arguments in launch config don't get recognized

Open ErwinSchleier opened this issue 2 years ago • 0 comments

on v0.3.9

with the following launch.json file:

{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "bashdb",
            "request": "launch",
            "name": "Bash-Debug With Arguments",
            "program": "${file}",
            "args": ["aaa", "", "bbb", "ccc", "ddd"]
        }
    ]
}

and the script:

#!/bin/bash

# Assign arguments to specific variables
One="$1"
Two="$2"
Three="$3"
Four="$4"
Five="$5"

# Print the values of the variables
echo "One: $One"
echo "Two: $Two"
echo "Three: $Three"
echo "Four: $Four"
echo "Five: $Five"

I receive the following output:

One: aaa
Two: bbb
Three: ccc
Four: ddd
Five: 

so the problem is, that the second variable Two, should be empty. But it's not. Am I doing something wrong or is it a bug?

ErwinSchleier avatar Jan 15 '24 16:01 ErwinSchleier