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

未關閉
#14,866 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
45/100
Issue 類型
功能
描述清晰度
基本清楚
活躍度
活躍
技術堆疊
typescript

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
TypeScript
星號
6.2k
分支
1.7k
平均合併
1 天 17 小時
30 天內合併 PR
12

環境準備

  • 沒有 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

microsoft/vscode-cpptools 的其他 Issue

查看 microsoft/vscode-cpptools 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。