microsoft / microsoft/vscode-cpptools
Support 'argsCanBeInterpretedByShell' property as part of DAP
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Feature Request
Can we support the "argsCanBeInterpretedByShell" property in the RunInTerminalRequest as part of the Debug Adapter Protocol? Official release notes - https://github.com/microsoft/vscode-docs/blob/vnext/release-notes/v1_70.md#argscanbeinterpretedbyshell-for-runinterminalrequest
This feature is supported by the VS Code Node debugger.
This will allow us to supply unmodified argument strings to the underlying C++ program when debugging. A use-case for this feature is to support prompting the user for command line arguments to pass to the underlying C++ program using VS Code's promptString variable substitution:
// launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "Debug with Args",
"type": "cppdbg",
"request": "launch",
// Resolved by CMake Tools:
"program": "${command:cmake.launchTargetPath}",
"args": "${input:commandLineArgs}",
"stopAtEntry": false,
"cwd": "${workspaceFolder}",
"environment": [
{
// add the directory where our target was built to the PATHs
// it gets resolved by CMake Tools:
"name": "PATH",
"value": "${env:PATH}:${command:cmake.getLaunchTargetDirectory}"
},
],
"MIMode": "gdb",
"setupCommands": [
{
"description": "Enable pretty-printing for gdb",
"text": "-enable-pretty-printing",
"ignoreFailures": true
}
],
}
],
"inputs": [
{
"type": "promptString",
"id": "commandLineArgs",
"description": "Args to pass to executable",
"default": ""
}
]
}
This launch.json file currently fails with a parse error:
Unable to start debugging. Error converting value "epex epex" to type 'System.Collections.Generic.List`1[System.String]'. Path 'args', line 1, position 121.
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 tracing the C++ extension's handling of the DAP RunInTerminalRequest and launch.json args parsing; the issue does not name specific files or tests. Check how argsCanBeInterpretedByShell is represented and verify that a promptString value such as "epex epex" is accepted and passed to the underlying program without the current parse error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100