Skip to content

Passing empty arguments in launch config don't get recognized #191

@ErwinSchleier

Description

@ErwinSchleier

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions