Skip to content

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

@kpg141260

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

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