Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Find All References strange behaviour (Read 8077 times)
Filipe Morais
Newbies
*
Offline


Posts: 5
Joined: Sep 11th, 2014
Find All References strange behaviour
Sep 11th, 2014 at 2:16pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Find All References strange behaviour
Reply #1 - Sep 11th, 2014 at 2:20pm
Print Post  
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
Joined: Sep 11th, 2014
Re: Find All References strange behaviour
Reply #2 - Sep 11th, 2014 at 2:24pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Find All References strange behaviour
Reply #3 - Sep 11th, 2014 at 2:28pm
Print Post  
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
Joined: Sep 11th, 2014
Re: Find All References strange behaviour
Reply #4 - Sep 11th, 2014 at 2:30pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Find All References strange behaviour
Reply #5 - Sep 11th, 2014 at 2:31pm
Print Post  
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
Joined: Sep 11th, 2014
Re: Find All References strange behaviour
Reply #6 - Sep 11th, 2014 at 2:51pm
Print Post  
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
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Find All References strange behaviour
Reply #7 - Sep 11th, 2014 at 3:15pm
Print Post  
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 TopicPrint