microsoft / microsoft/vscode-cpptools

Simplify generated launch.json

Aperta
#2,819 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

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

Descrizione

Hey,

VSCode dev here. This milestone I am looking into simplifing generated launch.json for various extensions Microsoft/vscode#62851

The launch.json that C++ generates is attached at the end. I suggest to simplify it the following way:

  • DebugConfigurationProvider should use the quickPick to ask the user if he would like to launch or attach. After that for the program name. Optimally it should be able to detect those things on its own, but if not possible use quickPick to ask the user.
  • Remove default fields which are not necessery like cwd, stopAtEntry, args, 'environment'
  • Do users ever change MIMode/ If no than this property should be append in the resolveConfiguraiton calls. That way the user will not see any of this and there will be far less clutter
  • You are already contributing snippets to launch.json, but not using the configuraitonSnippets field in the package.json. Why is that? Also these snippets could be simplified

If you agree with the suggestions I am making here I am also here to help with any potential questions you might have. The changes should not require a lot of work but will simplify the flow a lot imho. It should be much less complex and not too much like a wizard experience

{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "(lldb) Launch",
            "type": "cppdbg",
            "request": "launch",
            "program": "enter program name, for example ${workspaceFolder}/a.out",
            "args": [],
            "stopAtEntry": false,
            "cwd": "${workspaceFolder}",
            "environment": [],
            "externalConsole": true,
            "MIMode": "lldb"
        }
    ]
}

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 con DebugConfigurationProvider e le sue chiamate a resolveConfiguration, quindi esamina package.json per configurationSnippets. Esamina come viene attualmente generato launch.json, inclusi i prompt launch/attach e program e i campi predefiniti. Il lavoro è completato quando la configurazione e gli snippet generati sono più semplici, preservando al contempo il comportamento di avvio richiesto.

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

Valutazione

Stack tecnologico
cpp, typescript, vscode
Ambito
developer-experience, tooling
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.