Thanks to visit codestin.com
Credit goes to github.com

Skip to content

${env} isn't processed in C_Cpp.default.includePath #3309

@ijash

Description

@ijash

Type: LanguageService

Describe the bug

  • OS and Version: Linux mint 19.01
  • VS Code Version: 1.32.3
  • C/C++ Extension Version:0.21
  • Other extension: arduino 0.2.25

I can't get the C_Cpp.default.IncludePath get to work. please see details below.

To Reproduce

  1. i have followed the instruction in https://github.com/Microsoft/vscode-cpptools/blob/master/Documentation/LanguageServer/Customizing%20Default%20Settings.md
  2. my settings.json is
{    "C_Cpp.default.includePath": [
        "${env.HOME}/.arduino"
        ]
}

my c_cpp_properties.json is:

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "/opt/arduino/arduino-1.8.8/tools/**",
                "/opt/arduino/arduino-1.8.8/hardware/arduino/avr/**",
                "${default}"
            ],
            "forcedInclude": [
                "/opt/arduino/arduino-1.8.8/hardware/arduino/avr/cores/arduino/Arduino.h"
            ],
            "intelliSenseMode": "gcc-x64",
            "compilerPath": "/usr/bin/gcc",
            "cStandard": "c11",
            "cppStandard": "c++17"
        }
    ],
    "version": 4
}

mostly auto generated except ${default}

  1. i write in main.ino which use C++ language as follows:
#include <MFRC522.h>

and got a problem Include file not found in browse.path.

  1. BUT, when i move the "${env.HOME}/.arduino" to c_cpp_properties.json inside configurations->includePath array, the problem disappears.

Expected behavior

I expect something like global configuration or default configuration in settings.json so i don't have to re-write configuration each new project to c_cpp_properties.json. and my expectation is the same as issue #368 (comment)

Screenshots

this is the current problem:
image

this is the behavior after i edit the c_cpp_properties.json:
image

Additional context

-none

Metadata

Metadata

Assignees

No one assigned

    Labels

    Language ServicebugfixedCheck the Milestone for the release in which the fix is or will be available.quick fix

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions