Late last week we shipped the August 2018 update to the C/C++ extension for Visual Studio Code. This update included support for “Just My Code” symbol search, a gcc-x64 option in the intelliSenseMode setting, and many bug fixes. You can find the full list of changes in the release notes.
Visual Studio for Mac enables the creation of.NET Core solutions, providing the back-end services to your client solutions. Code, debug, and test these cloud services simultaneously with your client solutions for increased productivity.
![]() “Just My Code” symbol search
Keyboard shortcut Ctrl+T in Visual Studio Code lets you jump to any symbols in the entire workspace.
Download the C/C++ extension for Visual Studio Code, try it out and let us know what you think. File issues and suggestions on GitHub. If you haven’t already provided us feedback, please take this quick survey to help shape this extension for your needs. Visual Studio Code is a completely different (and much less advanced) tool than the standard Visual Studio product line. VS Code is more similar to Atom or Sublime. But it does seem to be improving very quickly. Visual Studio 2017 for Mac is actually a different beast from Visual Studio for Windows. As you may know, it is originally based on Xamarin Studio which on its turn is an extended form of MonoDevelop. In this video I am going to discuss one more cool extension for Visual Studio Code that unlock web sites development capabilities – Debugger for Chrome extension.
We have heard feedback that sometimes it is desired to have the system header symbols excluded from this search. In this update, we enabled “Just My Code” symbol search to filter out system symbols, which offers a cleaner result list and significantly speeds up symbol search in large codebases, and as such we’ve made this behavior the default.
If you need symbol search to also include system headers, simply toggle the C_Cpp.workspaceSymbols setting in the VS Code Settings file (File > Preferences > Settings).
Tell us what you think
Download the C/C++ extension for Visual Studio Code, try it out and let us know what you think. File issues and suggestions on GitHub. If you haven’t already provided us feedback, please take this quick survey to help shape this extension for your needs.
Active1 month ago
I've begun using VSC for my embedded C projects with gcc for ARM on a Mac. Having set up include paths in
c_cpp_properties.json , most of my #includes are now working. However, a line such as this:
produces a red squiggly underline and the error:
The source file in question includes stdint:
and the
includePath includes:
and:
(the only other option being
msvc-x64 ).
The codebase compiles just fine when I use make and gcc. How do I show the C/C++ extension where
uint32_t is?
Edit:
stdint.h looks like this:
![]()
and
stdint-gcc.h contains:
This suggests
__UINT32_TYPE__ is NOT defined when VSC is parsing my code, but it IS defined when I build with make and gcc.
Edit:
Following @mbmcavoy's answer I'm including my
c_cpp_properties.json file here:
![]()
Edit:
On digging deeper, I found that
gcc-arm-none-eabi-4_9-2015q3/lib/gcc/arm-none-eabi/4.9.3/include/stdint.h had __STDC_HOSTED__ defined and therefore stdint-gcc.h was not actually being included. Instead, that header does an 'include_next <stdint.h> ', which finds gcc-arm-none-eabi-4_9-2015q3/arm-none-eabi/include/stdint.h . I still can't see where unint32_t is defined, either for gcc and make or for VSC.
Visual Studio For MacGama11
15.6k66 gold badges3333 silver badges5353 bronze badges
EliotEliot
1,17722 gold badges1414 silver badges3737 bronze badges
2 Answers
After trying all of the proposed solutions to no effect, I consider the uint32_t issue to be a bug.
While programming tasks in the past might have been carried out on local servers, they’re now increasingly using platform-agnostic cloud services like (from Microsoft) and (from Amazon). Visula studio for mac. Microsoft has it’s launching its primary coding interface, Visual Studio, on Mac computers. The change comes as Microsoft shifts its focus to its money-making cloud operation. The news may sound uninteresting, but it’s been a long time coming, and is a big shakeup for the company, which has previously preferred to lock developers into its platform by keeping coding tools Windows-only.
To solve the annoying warnings in VSCode, just add the following line after your #include section:
By doing this once in a single file, it fixes my VSCode warnings and still compiles.
wscourge
5,41588 gold badges2929 silver badges5353 bronze badges
gekartgekart
I have been able to resolve this on my machine (Windows), with three steps:
The question is correct when it states 'This suggests
__UINT32_TYPE__ is NOT defined when VSC is parsing my code, but it IS defined when I build with make and gcc.' The ARM cross-compiler has many built-in defines that are not included in the clang-x64 parser.
First, find out defines your gcc compiler defines, with the
-dM -E options. On Windows I was able to dump the output to a file with echo | arm-none-eabi-gcc -dM -E - > gcc-defines.txt
Second, add the defines to your
c_cpp_properties.json file. Note that where the #define sets a value, you need to use an = sign here. (You could probably just add individual defines as you need them, but I used Excel to format them as needed and sort. The first defines are for my project, matching the defines in my Makefile.)
After doing a few experiments with individual defines, I could see the define as being processed in
stdint-gcc.h , any uses of the types still produced errors. I realized in my c_cpp_properties.json file that I had 'databaseFilename': ' This is used for the 'generated symbol database', but was not configured properly. I set it to:
After quitting and restarting Visual Studio Code, declarations do not result in the error, and when hovering over a variable, it shows the appropriate type.
mbmcavoymbmcavoy
1,81144 gold badges1717 silver badges3232 bronze badges
Visual Studio Professional For MacNot the answer you're looking for? Browse other questions tagged cgccvisual-studio-code or ask your own question.Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |