VS Arduino | |
Visual Micro >> Project Guidance >> Find All References strange behaviour
https://www.visualmicro.com/forums/YaBB.pl?num=1410444971 Message started by Filipe Morais on Sep 11th, 2014 at 2:16pm |
Title: Find All References strange behaviour Post by Filipe Morais on Sep 11th, 2014 at 2:16pm
Visual Micro has been a great help when compared to the arduino IDE. However, I am getting some strange behaviour with intellisense. When I right-click a variable and pick "Find All References", it seems like it does a simple text search and finds all occurences of the variable's name, instead of really finding all references to that variable. Any ideas on why this happens and is there a way to fix it?
|
Title: Re: Find All References strange behaviour Post by Visual Micro on Sep 11th, 2014 at 2:20pm
Which Ide?
Visual Studio and Atmel Studio work differently but I can tell you that Visual Micro just sets the project up then you are using native Ide functions to find references so my answer will be based on what each Ide supports. |
Title: Re: Find All References strange behaviour Post by Filipe Morais on Sep 11th, 2014 at 2:24pm
I am using VS Professional 2012. When programming in C# the "Find All References" has the behaviour which I said I'd expect (finding all references to the variable, not variable name occurences)
|
Title: Re: Find All References strange behaviour Post by Visual Micro on Sep 11th, 2014 at 2:28pm
Hi,
Thanks for the info. Normally VS 2012 is very good but remember that we are using a C++ project in VS and not a C# project. So find all references will do whatever Microsoft to in a C++ project. Sorry I can be more help maybe check with Microsoft Connect what should happen. For Arduino in VS we create an empty Win32 C++ project not using ATL then add the source code. |
Title: Re: Find All References strange behaviour Post by Filipe Morais on Sep 11th, 2014 at 2:30pm
Yes, I am aware that VS is mainly directed for C# and kinda feared it could not work so well with c++, but still hoped it was just a visual micro issue. Oh well, it's still way better than the regular IDE. Thanks a lot for the fast reply!
|
Title: Re: Find All References strange behaviour Post by Visual Micro on Sep 11th, 2014 at 2:31pm
No problem, I will try it out when I get a moment. I am surprised to hear that it is working that way. If you click F12 in a variable does it take you to the definition?
|
Title: Re: Find All References strange behaviour Post by Filipe Morais on Sep 11th, 2014 at 2:51pm
Yes, the go to definition utility works well. It's just the find all references one that looks buggy. It's particularly noticeable/annoying when you have variables with common names (like x, buffer, etc...) since it will point to all such words in all files (including local variables and even comments)
|
Title: Re: Find All References strange behaviour Post by Visual Micro on Sep 11th, 2014 at 3:15pm
Okay. You might find some vs extension that does the job better. Alternatively try making the variable private otherwise a lame hack might be to rename the variable so it is invalid then attempt to compile. This should show a 'clickable' error for every place the var has been used.
|
VS Arduino » Powered by YaBB 2.6.12! YaBB Forum Software © 2000-2025. All Rights Reserved. |