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
Hot Topic (More than 8 Replies) Re: peek definitions - definition for the symbol <any symbol>can not be located (Read 2215 times)
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: peek definitions - definition for the symbol <any symbol>can not be located
Sep 13th, 2023 at 7:42pm
Print Post  
Excuse me,
May I reanimate this topic?
When I ctrl-click on any variable in source in VS2022/VM, I get error messages from attachment 1.
When I ctrl-click on any include in source in VS2022/VM, I get error messages from attachment 2.
All sources are successfully buildable and loadable to Arduino.
Where and what should I configure VS/VM to get wanted info (i.e. header files or variables definitions) instead of error messages?

« Last Edit: Sep 13th, 2023 at 7:44pm by VSdev »  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #1 - Sep 13th, 2023 at 8:07pm
Print Post  
Hello, please create a new thread with your question. When you create the new thread add the information specified in the yellow box next the top of each form page.

It might also help to note that right click "Go To Definition (F12)" on a header file does work. This will probably be a question for Microsoft who are responsible for the feature. The fact that Go To definition works shows that all paths are configured correctly.

Unrelated to this particular issue, remember to click "vMicro>Show hidden Files", that often improves peek and goto definition.

Thanks
« Last Edit: Sep 15th, 2023 at 12:45pm by Tim@Visual Micro »  
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #2 - Sep 14th, 2023 at 6:38pm
Print Post  
Thank you for your tips.
Seems, I'm just spoiled by amenities of other modern and convenient IDEs like Intelij Idea.
Yes "Go To definition" works but not so elegant like in mentioned IDE.
Thank you for your help. That's enough for further work.

I believe that peek was implemented in  IntelliJ because a user requested that it be improved to work like Visual Studio Smiley

I suggest you use the Help menu to log a bug report with Microsoft. Pointing out that GoTo Definition works and Peek works on code other than #include <header.h>. That proves the VS project has the correct include paths.
« Last Edit: Sep 14th, 2023 at 10:05pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #3 - Sep 14th, 2023 at 8:17pm
Print Post  
The peek works on symbols/code etc. Only fails on #include statements? 

Out of interest, what do you expect it to do for an entire header/include?

Your can report it failing for #includes to Microsoft via the Help menu.

As far as I can tell, IntelliJ implemented peek after users requested it to work same as VS Smiley
« Last Edit: Sep 14th, 2023 at 10:28pm by Tim@Visual Micro »  
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #4 - Sep 15th, 2023 at 6:19am
Print Post  
I expect to open (preferable on separate tab) that was ctrl-clicked despite whether it is header or single object for reading source.
And if Intellij implemented such style of navigation following MS, then it is even more shame for MS, because in Idea it works out of the box. While in VS/VM it doesn't event after dances around it.
I migrated to VS/VM from spartan Arduino IDE in hope I get at least easy navigation between source code, not to mention luxury of code completion tips. But MS never really eager to please users. Seems, Arduino2 win this race.
  
Back to top
 
IP Logged
 
Simon@Visual Micro
Administrator
*****
Offline


Posts: 2697
Joined: Feb 13th, 2019
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #5 - Sep 15th, 2023 at 8:31am
Print Post  
Can you confirm which version of Visual Micro and Visual Studio you are using?

Also please confirm if your project has "(Arduino)" shown after its name in Solution Explorer?
  
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #6 - Sep 15th, 2023 at 5:54pm
Print Post  
I use:
Microsoft Visual Studio Community 2022 (64-bit) - Current  Version 17.7.4
Arduino IDE for Visual Studio by Visual Micro   22.0



Yes. Project has label "Arduino"
« Last Edit: Sep 15th, 2023 at 5:58pm by VSdev »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #7 - Sep 15th, 2023 at 6:01pm
Print Post  
Thanks, it isn't entirely clear to use if "goto definition" and/or peek is working as it should be for you. We might provide you a simple code project and ask you to confirm what works for you what does not.

In you recent post you mentioned ctrl+click. Please review the Tools>Options settings especially the following so see if that gives you epected result.


Note that opening in a new tab is usuall "Go To Definition" and opening in an in-place tip/window is Peek.

« Last Edit: Sep 15th, 2023 at 6:01pm by Tim@Visual Micro »  

Please Register or Login to the Forum to see File Attachments
Back to top
IP Logged
 
VSdev
Newbies
*
Offline


Posts: 9
Joined: Dec 11th, 2022
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #8 - Sep 15th, 2023 at 6:13pm
Print Post  
How did you do this???
Right now I went to test all that ways of navigation to answer you and found all of them working. Even ctrl+click!  Shocked
I did nothing. It started to work without any action from my side.
So, conclusion: it could work. But need something special. To whine a little bit in support.
Thank you anyway. Hope, effect will keep holding  Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12187
Location: United Kingdom
Joined: Apr 10th, 2010
Re: peek definitions - definition for the symbol <any symbol>can not be located
Reply #9 - Sep 15th, 2023 at 7:02pm
Print Post  
For external included code, such as libraries and core, saving/building rediscovers intellisense information. If you use the visual micro menus/buttons to add libraries or change board this would also cause an intellisense refresh. Opening a project also refreshes as do a few other commands.

Maybe you had just pasted in the code when you first attempted to use peek or goto?

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint