Sysprogs forums › Forums › VisualGDB › C++11 Intellisense in Visual Studio 2015
- This topic has 16 replies, 6 voices, and was last updated 8 years ago by support.
-
AuthorPosts
-
October 28, 2015 at 10:20 #7117MartinBonnerParticipant
I want Intellisense to understand things like std::unique_ptr and std::move. I have enabled -std=c++11 in CXXFLAGS.
If I open <utilty> I see:
#if __cplusplus >= 201103L #include <bits/move.h> #include <initializer_list>
The #includes are greyed out, and hovering over “__cplusplus” says it is #defined to 199711L
Following the earlier thread about C++11 Intellisense, I can see that Project Properties has $(ProjectDir)\gcc_Debug_ARM.h in the “Force Includes” section, and that gcc_Debug_ARM.h contains:
//VS2005-2012 treats all files as C++, while VS2013+ can treat C files correctly.
#if defined(_MSC_VER) && (_MSC_VER < 1800 || defined(__cplusplus))
#define __cplusplus 201103L
#endifHovering over _MSC_VER shows it #defined to 1900.
Why doesn’t Intellisense recognize all the C++11 features?
Finally, Help About Info from VS2015 shows:
Microsoft Visual Studio Professional 2015
Version 14.0.23107.0 D14REL
Microsoft .NET Framework
Version 4.6.00081Installed Version: Professional
LightSwitch for Visual Studio 2015 00322-40000-00000-AA452
Microsoft LightSwitch for Visual Studio 2015Visual Basic 2015 00322-40000-00000-AA452
Microsoft Visual Basic 2015Visual C# 2015 00322-40000-00000-AA452
Microsoft Visual C# 2015Visual C++ 2015 00322-40000-00000-AA452
Microsoft Visual C++ 2015ASP.NET and Web Tools 14.0.20626.0
ASP.NET and Web ToolsASP.NET Web Frameworks and Tools 2013 5.2.30624.0
For additional information, visit http://www.asp.net/Atomineer Pro Documentation 1.0
Source-code documentation-comment creation and maintenance, and other documentation-related tools.Common Azure Tools 1.5
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.Deleaker for Visual Studio 3.0.73.0
Deleaker detects leaks, shows allocated memory, GDI objects, handles and other objects.Extensibility Tools 1.5.103
An extension for making it easier to write Visual Studio extensionsGenerateUnitTest 1.0
Generates unit test code for methods in classes under test.Microsoft Azure Mobile Services Tools 1.4
Microsoft Azure Mobile Services ToolsMicrosoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggersNuGet Package Manager 3.2.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.Office Developer Tools for Visual Studio 2015 ENU 14.0.23025
Microsoft Office Developer Tools for Visual Studio 2015 ENUPreEmptive Analytics Visualizer 1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.Python Tools for Visual Studio 2.2.30718.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.Python Tools for Visual Studio – Django Integration 2.2.30718.00
Provides templates and integration for the Django web framework.Python Tools for Visual Studio – Profiling Support 2.2.30718.00
Profiling support for Python projects.Trailing Whitespace Visualizer 1.0
Makes it easier than ever to identify and remove trailing whitespace in any code fileVisual C++ for Cross Platform Mobile Development 1.0
Visual C++ for Cross Platform Mobile DevelopmentVisual C++ for Cross Platform Mobile Development 1.0
Visual C++ for Cross Platform Mobile DevelopmentVisual Studio Tools for Universal Windows Apps 14.0.23309.00 d14oob
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.VisualGDB 5.0
Allows developing and debugging Embedded, Linux, Android and other GCC/GDB-based applications with Visual Studio.VS10x CodeMAP Package 1.1
Powerful Visual Studio code editor visualizer (C#, VB, C++).VS10x Method Block Highlighter Package 1.2
Highlight entire methods with a colored background (green, yellow, cyan, magenta)Workflow Manager Tools 1.0 1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.October 28, 2015 at 13:26 #7119MartinBonnerParticipantWoo hoo! Found a workround: Go to “IntelliSense Settings” tab on the VisualGDB Project Properties, and change IntelliSense engine to “Enable advance Clang-base IntelliSense engine”.
(Of course, this does mean you have to go round fixing all the undefined behaviour that Clang doesn’t like in your code!)
October 29, 2015 at 12:27 #7123MartinBonnerParticipantHmm. That workround only seems to work sometimes 🙁
Anyone have any better solutions?
October 30, 2015 at 23:25 #7128supportKeymasterHi,
Yes, we have created the Clang-based IntelliSense because the VS IntelliSense does not work well with many GCC-specific extensions including the C++11 ones.
You can also enable the Clang IntelliSense globally via Tools->Options->VisualGDB. Please provide us an example of the code formatting problem in the other thread so that we could release a hotfix or suggest a workaround.
October 31, 2015 at 20:34 #7141ivasParticipantI’ve resolved this problem by adding “#undef __cplusplus” before “#define __cplusplus 201103L” in gcc_Debug.h and gcc_Release.h:
#if defined(_MSC_VER) && (_MSC_VER < 1800 || defined(__cplusplus))
#undef __cplusplus
#define __cplusplus 201103L
#endif
But every time when project’s settings is changed, VisualGDB restores these files.
November 3, 2015 at 20:45 #7158supportKeymasterHi,
As a workaround you can edit the Makefile settings by editing debug.mak and release.mak directly.
As VS IntelliSense often stops parsing the files silently when it encounters some extension that it does not support and those problems are very hard to diagnose, we recommend using the Clang engine instead.
November 4, 2015 at 09:45 #7162MartinBonnerParticipantSorry, I don’t understand your workround Bazis. What changes do I need to make to debug.mak/release.mak?
Notes:
- The workround that ivas suggests seems to work completely.
- The Clang engine is completely unacceptable until the formatting problem is fixed (see other thread). (I’d rather just switch off Intellisense entirely.)
November 6, 2015 at 18:48 #7168supportKeymasterHi,
VisualGDB rewrites the gcc_Debug.h file when you change some settings (e.g. include directories) in VisualGDB GUI. You can skip this process by changing the include directories/preprocessor macros directly in the debug.mak file.
We are sorry that the Clang engine is causing you troubles. The behavior you are encountering is definitely not by design and it looks like either a conflict between VisualGDB and some other plugin or a bug caused by some rare configuration setting. I have attached a link to a diagonstic build to the other thread, please give it a try and let me know the output it provides. This should help us pinpoint the problem.
January 8, 2016 at 10:44 #7448marrtinParticipantIt would be very useful to fix this problem. Clang intellisense often crash in my project, so I am using native intellisense.
Although the codemaps when Clang is used are great :(.
Is there really no another possibility to define #define __cplusplus 201103L in gcc_Debug.h correctly?
Now I have to use iva’s solution with undef, but I have to do it everytime, when I change something in VisualGDB settings.
Of course it’s confusing.
January 8, 2016 at 12:05 #7449MartinBonnerParticipantClang intellisense is (I believe) the preferred solution. If Clang intellisense is crashing in your project, I am pretty sure Sysprogs would like to know about it – raise a separate issue for it though. (I do have a formatting problem with Clang Intellisense, for which they have send me a test fix – but I haven’t tried it yet. I must.)
January 8, 2016 at 14:03 #7451marrtinParticipantThanks for your comment.
I noticed that Clang intellisense looks very nice for me. And there aren’t such problems with c++11.
But it is also disturbing often to see dialog CppEngineHost has stopped working. It didn’t cause the crash of Visual studio but my trust to this intellisense engine is at that moment less :).
January 12, 2016 at 02:51 #7460supportKeymasterHi,
Yes, we specifically designed the Clang engine to run in a separate process so that any crashes inside clang don’t affect your Visual Studio.
Are you able to reliably reproduce some of the crashes and send us the repro instructions? If it only happens with your project, we can send you a debug build of the engine so that you could create a dump file.
We have easily fixed previous crashes like that, so your crash dumps are more than welcome.
July 29, 2016 at 09:23 #8723RumchillerParticipantHi,
I have the same problem with my project. I have to put the #undef in the gccdebug.h file. Without it I get a bunch of errors. Is there a workaround?
It seems, that the Clang Engine is not running, here is the output:
[+0:00:00.000] Starting operation: Wrapping C:\Users\Werkstatt\Desktop\Wuchtmaschine\ERB_FW_SPL_DP\ERB_FW_SPL_DP\ERB_FW_SPL_DP.vcxproj
[+0:00:00.039] C:\Users\Werkstatt\Desktop\Wuchtmaschine\ERB_FW_SPL_DP\ERB_FW_SPL_DP\ERB_FW_SPL_DP.vcxproj: found 85 source files
[+0:00:00.039] Operation completed: Wrapping C:\Users\Werkstatt\Desktop\Wuchtmaschine\ERB_FW_SPL_DP\ERB_FW_SPL_DP\ERB_FW_SPL_DP.vcxproj [37 msec]
[+0:00:00.039] VSProjectWrapper: _Instance not set while trying to extract project compiler arguments
[+0:00:00.039] Stack trace:
[+0:00:00.039] bei k91.r1.t_2()
[+0:00:00.039] bei uh1.BuildProfileForSupportedCppProject(Object c, String a, ICppLanguageService b)
[+0:00:00.039] bei tu.f1(Project b, IVsHierarchy c, List`1 a)Thanks in advice.
Greetings
Reginald Leonczuk
- This reply was modified 8 years, 3 months ago by Rumchiller.
July 29, 2016 at 15:53 #8725supportKeymasterThis is a known bug. Please try this build and let us know if the problem still reoccurs: http://sysprogs.com/files/tmp/VisualGDB-5.2.5.954.msi
July 31, 2016 at 18:18 #8728RumchillerParticipantThanks, I will try this build next week.
Oddly enough, Clang started working today.
-
AuthorPosts
- You must be logged in to reply to this topic.