Skip to content

invalid arithmetic operator (error token is "[$@] #203

Description

@kpg141260

Error: .vscode-oss/extensions/rogalmic.bash-debug-0.3.9/bashdb_dir/lib/fns.sh: line 45: COMPONENTS[$@]: arithmetic syntax error: invalid arithmetic operator (error token is "[$@]")

The debugger is trying to evaluate source lines and stumbles over array subscripts that include "$@" (which expands to multiple words), producing the arithmetic-syntax error.

Root cause: bashdb's expression extractor/evaluator is turning a source line that contains an array subscript with "@" (orothernon−numeric/index expressions) into something evaluated in an arithmetic/conditional context. Because"@" expands to multiple tokens (and contains brackets), the arithmetic evaluator errors: "invalid arithmetic operator (error token is "[$@]")".

The error occurs in line 45 of fns.sh

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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