Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Find All References strange behaviour (Read 5797 times)
Filipe Morais
Newbies
*
Offline



Posts: 5
Find All References strange behaviour
Sep 11th, 2014 at 3: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?
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Find All References strange behaviour
Reply #1 - Sep 11th, 2014 at 3: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.

Back to top
 
WWW  
IP Logged
 
Filipe Morais
Newbies
*
Offline



Posts: 5
Re: Find All References strange behaviour
Reply #2 - Sep 11th, 2014 at 3: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)
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Find All References strange behaviour
Reply #3 - Sep 11th, 2014 at 3: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.
Back to top
 
WWW  
IP Logged
 
Filipe Morais
Newbies
*
Offline



Posts: 5
Re: Find All References strange behaviour
Reply #4 - Sep 11th, 2014 at 3: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!
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Find All References strange behaviour
Reply #5 - Sep 11th, 2014 at 3: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?
Back to top
 
WWW  
IP Logged
 
Filipe Morais
Newbies
*
Offline



Posts: 5
Re: Find All References strange behaviour
Reply #6 - Sep 11th, 2014 at 3: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)
Back to top
 
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10473
United Kingdom
Re: Find All References strange behaviour
Reply #7 - Sep 11th, 2014 at 4: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.
Back to top
 
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print