Type: Debugger
Describe the bug
- OS and Version: Windows 7
- VS Code Version: 1.26.1
- C/C++ Extension Version: 0.18.1
- Other extensions you installed (and if the issue persists after disabling them):
- Process picket command fails due to unexpected operator
To Reproduce
"name": "(gdb)",
"type": "cppdbg",
"request": "attach",
"program": "...",
"processId":"${command:pickRemoteProcess}",
"pipeTransport": {
"pipeCwd": "",
"pipeProgram": "C:/Program Files/Git/usr/bin/ssh.exe",
"pipeArgs": [
"root@172.20.0.253"
],
"debuggerPath": "/usr/bin/gdb"
},
Steps to reproduce the behavior:
- Try to connect to Ubuntu 16.04 using above config
- Get error message containing the following:
sh: 1: [: Linux: unexpected operator
sh: 1: [: Linux: unexpected operator
Trying to debug, it appears the following command is being executed:
uname && if [ $(uname) == "Linux" ] ; then ps axww -o pid=,comm=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,args= ; elif [ $(uname) == "Darwin" ] ; then ps axww -o pid=,comm=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,args= -c; fi
I get the following output executing the command manually.
I believe the problem is the use of '=='. As far as I know, this depends on bash. The normal shell should use '=' instead.
Additional context
Output window contains:
Linux
sh: 1: [: Linux: unexpected operator
sh: 1: [: Linux: unexpected operator
Nothing else is logged, despite logging being enabled
Type: Debugger
Describe the bug
To Reproduce
Steps to reproduce the behavior:
sh: 1: [: Linux: unexpected operator
sh: 1: [: Linux: unexpected operator
Trying to debug, it appears the following command is being executed:
uname && if [ $(uname) == "Linux" ] ; then ps axww -o pid=,comm=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,args= ; elif [ $(uname) == "Darwin" ] ; then ps axww -o pid=,comm=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa,args= -c; fiI get the following output executing the command manually.
I believe the problem is the use of '=='. As far as I know, this depends on bash. The normal shell should use '=' instead.
Additional context
Output window contains:
Linux
sh: 1: [: Linux: unexpected operator
sh: 1: [: Linux: unexpected operator
Nothing else is logged, despite logging being enabled