Extending Visual Studio Intellisense

NEWS/BETA TEST 28th April 2016  - New Clang intellisense system will shortly be released as the default project type for Visual Micro. Clang C++ project types (in Visual Studio) are a better fit for Arduino development than the current Microsoft C++ project type that Visual Micro uses. You can try this out for yourself by installing the Android tools for Visual Studio which use a similar system. Read more

How to fiddle intellisense in the current release

Visual Studio does not natively understand some Arduino (gcc) syntax. However it is flexible enough to allow us to extend or change how it interprets code without affecting the actual compilation.

The _MSC_VER constant is defined when editing code but not when compiling.

Override Visual Studio intellisense by adding a header file to the project which contains code that is active when the _MSC_VER constant is populated. 


Add an intellisense.h to your project with the following code. (The .h file can be called anything)

Add new/overriding dummy prototypes and definitions where shown.

Code (C++):

#pragma once

#if _MSC_VER

//insert dummy defs here


Tips: You do not need to #include the header in any source code. The header files does need to be included into the "solution explorer/project"

Other Pages