-
Notifications
You must be signed in to change notification settings - Fork 1.6k
VS Code reports language server error related to generated compilerPath in c_cpp_properties.json by Arduino extension #10385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @milanbx . The "@" followed by a path is a valid compiler argument for gcc, clang and CL.exe. It indicates that additional arguments should be read from the indicated file. https://gcc.gnu.org/onlinedocs/gcc/Overall-Options.html#Overall-Options (bottom of the page) However, the C/C++ extension does not support that syntax when used as the compiler path itself, only as an argument to a compiler that supports it. If the Arduino extension generated that |
Hi @Colengms and thanks for your explanation of the "@" prefix. I was wondering too, what that usage means of this syntax pointing to whole path of files instead of one. Arduino extension might generate this in gooe faith, it will instruct the compiler to look into every configuration file in the targeted folder. |
Hi @milanbx . Also, I'm not able to reproduce the crash you are seeing. Which version of the C/C++ extension are you reproducing this with? Would you be able to connect the debugger to |
Hi @milanbx . I believe I closed this issue prematurely, based on the first part being resolved. Are you still able to reproduce the crash? |
Hi, the issue was casused by Arduino ESP8266 Core liberary settings and solved here: esp8266/Arduino#8809. I am not able to reproduce this again. Thanks. |
Environment
Version: 1.74.3
Commit: 97dec172d3256f8ca4bfb2143f3f76b503ca0534
Date: 2023-01-09T16:59:02.252Z
Electron: 19.1.8
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Windows_NT x64 10.0.19045
Sandboxed: No
Bug Summary
After upgrading ESP8266/Arduino core to v3.1.1, the Arduino extension regenerated th

c_cpp_properties.json
file with acompilerPath
attribute having value causing following C/C++ configuration error:Unable to resolve configuration with compilerPath: "@D:\Portable\Arduino\portable\packages\esp8266\hardware\esp8266\3.1.1\tools\warnings\default-g++"
On top of this line from
C/C++ Configuration Warning
output, the Code UI shows 5 instances ofcpptools
output windows, all having same content (see also snapshot below):[Error - 18:20:27] Connection to server got closed. Server will not be restarted.
Then, the intellisense stops working at all, no cross reference can be followed (Ctrl+left mouse click) to see details of function or variable declaration etc.
Steps to reproduce
Just run VS Code, open any sketch with Arduino code (*.ino), even empty one. Popup error start to come up in the lower right corner - see snapshot:

Code snippet
Every, does not matter, even this simple blinking LED example:
Configuration
Other Extensions
Arduino: 0.4.12
C/C++ Extension Pack: 1.3.0
VS Code Dev Tools Console Log
vscode-app-1673804966418.log
The text was updated successfully, but these errors were encountered: