microsoft / microsoft/vscode-cpptools
Apply pipeTransport.quoteArgs to pickRemoteProcess command
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: Debugger
Describe the bug
- OS and Version: Arch Linux
- VS Code Version: 1.52.1
- C/C++ Extension Version: 1.1.3
- Other extensions you installed (and if the issue persists after disabling them): Not relevant
When running the pickRemoteProcess command via pipeTransport, quoteArgs is not applied to pipeArgs and the args are quoted regardless of the value of quoteArgs.
To Reproduce
{
"version": "0.2.0",
"configurations": [
{
"type": "cppdbg",
"program": "/usr/lib/systemd/systemd-resolved",
"processId": "${command:pickRemoteProcess}",
"request": "attach",
"name": "Attach",
"pipeTransport": {
"pipeCwd": "${workspaceFolder}",
"pipeProgram": "mkosi",
"pipeArgs": [
"ssh"
],
"debuggerPath": "/usr/bin/gdb",
"quoteArgs": false
}
}
]
}
Produces in the error log:
Command failed: "mkosi" "ssh" 'sh -c "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"'
We can see "ssh" is quoted even though quoteArgs is set to false.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the implementation of the pickRemoteProcess command and its pipeTransport argument construction. Reproduce the configuration from the issue with quoteArgs set to false, then verify that pipeArgs are not quoted in the generated command while the true setting retains quoting.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100