Each configuration in `c_cpp_properties.json` supports independent environment variables.

Aperta
#14,866 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
typescript

Direzione di ricerca

The issue describes c_cpp_properties.json configurations and proposes an environmentSetupScript setting, but names no implementation files or tests. Start by finding where configuration properties are defined and loaded, then trace how the selected configuration is applied. Done means each configuration can use its own environment setup script when selected; the issue does not specify test locations or exact behavior.

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

Descrizione

Feature Request Language Service
Feature Request

Some toolchains require environment variables to be set beforehand in order to compile successfully, such as QNX.

For example, changing the c_cpp_properties.json from

{
    "configurations": [
        {
            "name": "qnx710",
            "compileCommands": "qnx710_build/compile_commands.json",
            "browse": {
                "path": []
            }
        },
        {
            "name": "qnx800",
            "compileCommands": "qnx800_build/compile_commands.json",
            "browse": {
                "path": []
            }
        }
    ],
    "version": 4
}

to

{
    "configurations": [
        {
            "name": "qnx710",
            "environmentSetupScript": "/opt/qnx710/qnxsdp-env.sh",
            "compileCommands": "qnx710_build/compile_commands.json",
            "browse": {
                "path": []
            }
        },
        {
            "name": "qnx800",
            "environmentSetupScript": "/opt/qnx800/qnxsdp-env.sh",
            "compileCommands": "qnx800_build/compile_commands.json",
            "browse": {
                "path": []
            }
        }
    ],
    "version": 4
}

Requiring users to import environment variables before launching VS Code would be cumbersome, because a project may contain many configurations, not just the two mentioned above, and users may frequently switch between configurations.

Lingua principale
TypeScript
Stelle
6.2k
Fork
1.7k
Merge medio
1g 17h
PR unite (30g)
12

Preparare l'ambiente

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.

Altre issue di microsoft/vscode-cpptools

Tutte le issue di microsoft/vscode-cpptools

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.