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

Đang mở
#14,866 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
45/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
developer-experience

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.

Ngôn ngữ chính
TypeScript
Star
6.2k
Fork
1.7k
Merge trung bình
1 ngày 17 giờ
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của microsoft/vscode-cpptools

Tất cả issue của microsoft/vscode-cpptools

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.