microsoft / microsoft/vscode-mono-debug

Can't launch debug (sh: 1 [: Linux: unexpected operator)

Open
#49 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
180
Forks
182
Avg merge
1d 8h
Merged PRs (30d)
1

Description

This appears to be a regression, and someone filed an issue on the main VS Code repo, and the developer just closed it and asked them to file it here. I don't think they did, so:

Platform
4.15.0-33-generic #36~16.04.1-Ubuntu SMP (x64)

Build info
Version: 1.26.1
Commit: 493869ee8e8a846b0855873886fc79d480d342de
Date: 2018-08-16T18:34:20.517Z
Electron: 2.0.5
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(gdb) Remote Debug",
            "type": "cppdbg",
            "request": "attach",
            "program": "/usr/src/build/bin/qd",
            "processId": "${command:pickRemoteProcess}",
            "targetArchitecture": "arm",
            "pipeTransport": {
                "debuggerPath": "/usr/bin/gdb",
                "pipeProgram": "/usr/bin/ssh",
                "pipeArgs": ["root@tom"],
                "pipeCwd":"${workspaceFolder}"
            },
            "MIMode": "gdb",
            "setupCommands": [
                {
                    "description": "Enable pretty-printing for gdb",
                    "text": "-enable-pretty-printing",
                    "ignoreFailures": true
                }
            ]
        }
    ]
}

Resulting output (says remote-attach)

Linux
sh: 1: [: Linux: unexpected operator
sh: 1: [: Linux: unexpected operator

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the remote-attach configuration from launch.json on the reported Ubuntu environment and inspect where the debug adapter invokes sh. Confirm the fix by launching the same configuration without the “unexpected operator” errors and with remote attach working.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, linux, shell, vscode
Domain
devtools, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.