-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
C++ Syntax error checking not working #2164
Comments
Our extensions supports error squiggles -- I believe the other C++ extensions you have installed are causing a conflict. You should try disabling them. |
Yeah, something strange is going on. What does it show in the Output window, C/C++ panel? You may need to set the C_Cpp.loggingLevel to "Debug". Do other features like Go to Definition or Format Document work? Is the file encoding UTF-8? |
Thanks a lot for looking into it except from these issues I think you build an amazing app. I enabled "Debug" like you said and checked the output of the C/C++ panel I attached the output below.
Output C/C++ panel |
You need to change your "intelliSenseEngine" setting to "Default" instead of "Tag Parser". |
O your right that's it! Sorry for taking your time. I don't know how it happend but in the user settings file there is a command overwriting the intelliSenseEngine settings. Can this be caused by installing a lot of plugins? |
It's possible for another extension to change/modify our settings...I haven't heard of any extensions that do that though. If enabling an extension causes the setting to change back to Tag Parser you may need to disable that extension. |
Sean one more question If I may. Why does the syntax checker not work in the following code document? I think it is due to the fact that the header files were not found. Can I disable this behaviour that visual code doesn't display errors when a header file is not found? I am working on a singularity image so the header files are there but just not seen by visual code. Thank a lot in advance, |
Yes, you can change the "intelliSenseFallbackMode" to "Disabled", but from your screenshot I don't see the green squiggle that is supposed to appear under missing headers. If you look for the Microsoft.VSCode.CPP.IntelliSense.Msvc process and it appears and then disappears after opening the file, then it means something in the headers is causing a crash during parsing. |
Ah sorry, I accidentally only send you the screenshot in which it was working. But your answer was the one I was looking for thanks a lot! |
Type: LanguageService
Dear Developers, I just switched from sublime text to visual studio code and I really love the program. I, however, have one thing I miss in the program namely c++ code linting. I looked on the issues forum but I can however not find a way to enable this. My question is, therefore, does visual studio code support c++ code linting to warn me on potential syntax errors before compiling. I have it working with the cppcheck extension but the workflow is far from optimal. Is there a better way to have visual code check the cpp files everytime I save my file?
Describe the bug
OS and Version: Linux ubuntu Bionic beaver 18.04
VS Code Version: Version 1.24.1
C/C++ Extension Version: Version 0.17.4: May 31, 2018
Other extensions you installed (and if the issue persists after disabling them): vscodevim.vim, pkief.material-icon-theme, jerryhong.autofilename, mitaki28.vscode-clang, austin.code-gnu-glob, twxs.cmake, vector-of-bool.cmake-tools, nonylene.dark-molokai-theme, eamodio.gitlens, ajshort.msg, pijar.ros-snippets.
A clear and concise description of what the bug is.
When making syntax errors see picture below in sublime text I get a red wavy underline under the syntax error. In visual studio code, I found no way to get the same behaviour.
To Reproduce
Steps to reproduce the behavior:
Provide a code sample including configuration files such as c_cpp_properties.json
What I tried
Expected behavior
A red error underline when I make a syntax error.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: