microsoft / microsoft/vscode-cpptools

Support 'argsCanBeInterpretedByShell' property as part of DAP

Aperta
#10,654 1 commento 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

debugger Feature Request
Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
14h 46m
PR unite (30g)
61

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia tracciando come l’estensione C++ gestisce DAP RunInTerminalRequest e il parsing degli argomenti di launch.json; l’issue non indica file o test specifici. Verifica come viene rappresentato argsCanBeInterpretedByShell e assicurati che un valore promptString come "epex epex" venga accettato e passato al programma sottostante senza l’attuale errore di parsing.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, vscode
Ambito
devtools
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.