microsoft / microsoft/vscode-cpptools

Simplify generated launch.json

Offen
#2,819 4 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

debugger
Vorherrschende Sprache
TypeScript
Sterne
6.2k
Forks
1.7k
Ø Merge
14 Std. 46 Min.
Gemergte PRs (30 T.)
61

Beschreibung

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"
        }
    ]
}

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit dem DebugConfigurationProvider und seinen resolveConfiguration-Aufrufen und sieh dir dann package.json auf configurationSnippets an. Überprüfe, wie launch.json derzeit generiert wird, einschließlich der launch/attach- und program-Eingabeaufforderungen sowie der Standardfelder. Als abgeschlossen gilt die Aufgabe, wenn die generierte Konfiguration und die Snippets einfacher sind und gleichzeitig das erforderliche Startverhalten beibehalten wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cpp, typescript, vscode
Bereich
developer-experience, tooling
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.