Comments (7)
Do you see anything like this in the C/C++ extension logs? You might need to increase the logging level (C_Cpp.loggingLevel
):
cpptools/queryTranslationUnitSource: C:\Projects\Project\main.c (id: 3)
Custom configurations received:
uri: ...
config: { ...
If so, does the uri and configuration look correct? The configuration you get for main.c is the default intellisense config, which means that the C/C++ extension either isn't receiving the custom configuration, or is ignoring it.
from iar-vsc-build.
No, a custom configuration is not received:
loggingLevel: Debug
Custom configuration provider 'IAR Build' registered
Custom browse configuration received: {
"browsePath": [ ... ],
"compilerPath": "",
"compilerArgs": [],
"standard": "c17",
"windowsSdkVersion": "",
"compilerArgsLegacy": []
}
cpptools/didChangeCppProperties
Unable to configure for compiler cl.exe.
No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.
Code browsing service initialized
Unable to configure for compiler cl.exe.
No suitable compiler found. Please set the "compilerPath" in c_cpp_properties.json.
Folder: C:/PROJECTS/PROJECT/ will be indexed
cpptools/didChangeCustomBrowseConfiguration
Discovering files...
Skipping query of compiler due to explicitly empty compilerPath
Folder: C:/PROJECTS/PROJECT/ will be indexed
... (more indexing)
cpptools/didChangeSettings
IntelliSense Engine = Default.
Enhanced Colorization is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Autocomplete is enabled.
cpptools/didChangeSettings
IntelliSense Engine = Default.
Enhanced Colorization is enabled.
Error squiggles are enabled if all header dependencies are resolved.
Autocomplete is enabled.
cpptools/didChangeCppProperties
cpptools/pauseParsing
cpptools/clearCustomConfigurations
cpptools/queryTranslationUnitSource: C:\Projects\Project\main.c (id: 2)
textDocument/didOpen: C:\Projects\Project\main.c
cpptools/clearCustomConfigurations
Checking for syntax errors: C:\Projects\Project\main.c
cpptools/queryTranslationUnitSource: C:\Projects\Project\main.c (id: 3)
cpptools/resumeParsing
cpptools/resumeParsing
cpptools/getDocumentSymbols: C:\Projects\Project\main.c (id: 4)
cpptools/getCodeActions: C:\Projects\Project\main.c (id: 5)
cpptools/getFoldingRanges: C:\Projects\Project\main.c (id: 6)
Aborting tag parse of C:\Projects\Project\main.c and dependencies
Discovering files: 0 file(s) processed
Done discovering files.
Discovering files...
Processing folder (recursive): C:/PROJECTS/PROJECT/SRC
...(more processing)
Discovering files: 9654 file(s) processed
0 file(s) removed from database
Done discovering files.
Populating include completion cache.
Parsing remaining files...
...
sending compilation args for C:\Projects\Project\main.c
...
For the file which is not part of the project i do receive a custom configuration.
from iar-vsc-build.
Just to clarify some things:
Do you get the incorrect configuration for all files in the project, if there are multiple?
Does this occur for all projects you open or just this one?
There is an unlikely case where an error could occur but not be logged, and that seems to be the only possible explanation here. To confirm it, I would need to add some more logging in the next extension update, and then you can check the logs again after the update is released. I'm not sure exactly when that will be, but it should be fairly soon.
from iar-vsc-build.
Yes, i get the incorrect configuration for all files in the project and this also occurs for all projects.
from iar-vsc-build.
Okay, so i dug a bit more into this. Seems like the C++ extension has a 2 second timeout on providing it the configuration and this extension needs more than this (~2-4s) on my machine / for my project. Any idea how to speed this up?
from iar-vsc-build.
Thanks, that explains a lot. In order to generate the configuration for a file, we run the compiler with some special flags that output include paths and defines. This parses the entire file, so if the file is large or the cpu is busy, it's not impossible for this to take a few seconds.
I'll see if we can speed it up in any way, but I also want to ask the C/C++ extension developers if they could increase the timeout window; 2 seconds seems like a really short timeout.
from iar-vsc-build.
Increasing the timeout has apparently been asked about before:
microsoft/vscode-cpptools#2229
I've fixed the problem by checking if we time out, and asking the C++ extension to resend the reqeust in that case.
from iar-vsc-build.
Related Issues (20)
- Build tasks do not start HOT 3
- Prevent file tree being expanded on open HOT 8
- Can't load project with multiple prebuild directives HOT 4
- When I use --preinclude cmake reports an error.
- Changing the project configuration does not correctly update preprocessor macros for Intellisense
- Cannot build single file at a time HOT 1
- IAR Visual Studio Code Intellisense does not recognize CMSIS packages
- Build fails when using the $WS_DIR$ macro in the prebuild command HOT 7
- IAR VSCode extension error HOT 1
- Intellisense fails for NAN and INFINITY from iar math.h for RX HOT 2
- Failed to load project error, 'Invalid method name: 'GetCurrentConfiguration' with v1.30.5 release HOT 1
- No command available to build current project HOT 2
- Failed to Batch Build when using $WS_DIR$ in custom arguments file HOT 1
- Incorrect intellisense for currently selected project HOT 4
- Overwriting settings in ".vscode\iar-vsc.json" HOT 1
- Sync launch.json with project files HOT 6
- Cannot force IntelliSense file associations to cpp for .c files HOT 1
- Intellisense generates error for @ address assignments HOT 1
- Configuration selection doesn't write iar-vsc.json HOT 1
- Intellisense problem with $CONFIG_NAME$ preprocessor HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from iar-vsc-build.