Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Visual Studio - Peek Definition problem
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 08 2023 :  05:33:12 AM  Show Profile  Reply with Quote
Hi,

I am using the Visual Studio - Peek Definition a lot.
Since the last upgrade (upgraded both Visual Studio to version 17.7.4 and Visual Assist to version 10.9.2502.0) I have problem.

When disabling Visual Assist, Peek Definition works fine.

But when having Visual Assist enabled, Peek Definition will first go to the correct place, then do a second scrolling within the Peek Definition result window, making me not find what I want to see.

I have tried to disable a lot of things in the "Visual Assist Options" without any result.
This has always worked before.
Anyone knowing of a setting I may have missed?

Regards
Mats

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Nov 08 2023 :  06:00:57 AM  Show Profile  Reply with Quote
So far I cannot reproduce this problem here, I am using VS2022 version 17.7.6 and VA 2502.0, working in C++.

I am triggering peek definition by opening the IDE context menu and selecting the command from there.

Are you seeing this problem on all symbols, or only some? What happens if you peak at a symbol definition inside your solution? Or a symbol definition in a stable include directory? I am wondering if there is any difference here.

zen is the art of being at one with the two'ness
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 08 2023 :  07:17:40 AM  Show Profile  Reply with Quote
Hi,
You are on to something here.
It is when I (from a .cpp file) want to see a global definition/typedef... I have this problem

It works when I peek my own projects classes/class members

I am triggering Peek Definition from a button in my customized Visaul Studio menu bar
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 08 2023 :  07:19:43 AM  Show Profile  Reply with Quote
For ex, it don't work when i want to see definition of IDOK in WinUser.h
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 08 2023 :  07:32:23 AM  Show Profile  Reply with Quote
Sorry, now I got it with my projects classes/class members also.
Hard to figure out when it does not happens every time with them
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Nov 08 2023 :  07:43:36 AM  Show Profile  Reply with Quote
I am seeing a slight delay after the peak window appears, before VA draws its context and definition fields into the peek window. Are you seeing the same thing? I am wondering if these fields being displayed could be a factor.

To test this, can you please try turning Off:

VA Options -> Display -> Display VA Navigation Bar:

and see if this has any obvious effect? Since it sounds like there is a slight random element at work here, you will obviously need to test this a few times, to see if there is a reliable change in behaviour.

zen is the art of being at one with the two'ness
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 08 2023 :  07:53:27 AM  Show Profile  Reply with Quote
Yes, it sounds like that.
When it don't work, i first see the correct place in the Peek Definition window.
Then after ca 0,5 seconds, the scrolling occur.

So if I am a fast reader, i will get the info before it scrolls away.
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 08 2023 :  07:56:54 AM  Show Profile  Reply with Quote
No, same thing when turn off VA Options -> Display -> Display VA Navigation Bar
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Nov 08 2023 :  12:50:09 PM  Show Profile  Reply with Quote
First, can you please try making a new, default C++ solution, and see if you still get this problem? I don't see how this could be solution specific, but this should be a quick and easy test.

If you still see the problem, the next text is to see if you can reproduce this problem in a new, default IDE profile. It is possible another IDE extension, or some odd problem in your profile or settings is an issue, which this will help to test. Can you first download the VS2022 specific installer for Visual Assist from:

https://downloadfiles.idera.com/WholeTomato/VA_X_Setup2502_0_x64.vsix

Next you will need extra details about the IDE install to create a test profile. To get these details, please open a Windows command prompt window, and inside the window run the command:

"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"

There will be a set of lines for each different version of Visual Studio that you have installed. For the version you want to install into, you want the "productPath", "dispalyName" and "installationVersion" lines, e.g.

productPath: C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe
displayName: Visual Studio Professional 2022
installationVersion: 17.4.33213.308

You can then use the information from these three lines to make sure that the following command has the correct command line parameters. The values are:

/appidname: = displayName:
/appidinstallpath: = productPath:
/skuVersion: = installationVersion:

The "/skuName:" value is one of "Community / Pro / Enterprise", note for the Professional version it is "Pro", not the expected "Professional".

The working command, for VS2022, using the values above, is - split into lines to make it easier to read and edit:


"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\VSIXInstaller.exe"
/appidinstallpath:"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe"
/skuName:Pro
/appidname:"Visual Studio Professional 2022"
/skuVersion:17.4.33213.308
/rootSuffix:"VATest" "C:\Users\%USERNAME%\Downloads\VA_X_Setup2502_0_x64.vsix"


The "rootSuffix" is the name of the test profile you want to install to, and this will be created if it does not already exist. The final parameter is the path of the VSIX installer for Visual Assist that you want to install. Once you have the command set up, the only parts you should need to edit are the skuVersion and the path to the VSIX file, can you please close all instances of Visual Studio and run this command.

Running this command installs VA into the test profile, but it does not load the test profile. If you created the test profile by installing VA, when you run the test profile it will be using the default IDE settings, without asking you which settings you want to use.

To now load the test profile you use the command:

"C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\IDE\devenv.exe" /RootSuffix VATest

To load your normal, default profile just load the IDE normally. To return to this test profile again, pass the /RootSuffix command line switch when loading the IDE. You can run both profiles at the same time, next to each other. In VS2019 and VS2022 the profile name will be shown just under the close button, in the top right hand corner of the main IDE window. If you export your IDE settings from your main profile you can them import them into the test profile.

zen is the art of being at one with the two'ness
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 09 2023 :  09:47:42 AM  Show Profile  Reply with Quote
Thanks a lot for all the instructions.
I will do it as soon I can (this day got totally crowded)
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 09 2023 :  10:11:24 AM  Show Profile  Reply with Quote
Hi,
I tested making a new default C++ solution (an MFC project like my main one).
And I cannot recreate the problem with that.
I have been Peeking around a lot for 5 minutes, both locally and in environment and it works every time.
Also used my "problem solution" in parallel to peek the same things, and got the problem in there.

So your suspicion looks correct. Seems to be some solution related problem(?!)
Works great in the new solution.

FYI: I do not have any VS Extension other than Visual Assist. They have been problems in the past. It's only VA I cannot do without;-)
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Nov 09 2023 :  10:50:34 AM  Show Profile  Reply with Quote
That is a surprise to be honest with you, but thank you for trying the test.

Off the top of my head, the only thing that makes much sense is a problem with the IDE intellisense database for your main solution. To test this, can you please try setting:

IDE tools menu -> Options -> Text Editor -> C/C++ -> Advanced -> Recreate Database = True

and then restarting the IDE. This should only take a few minutes, at most, unless your solution is really massive. Does this make any difference?

zen is the art of being at one with the two'ness
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 09 2023 :  11:33:09 AM  Show Profile  Reply with Quote
Tried IDE tools menu -> Options -> Text Editor -> C/C++ -> Advanced -> Recreate Database = True
And restarted.
Still have the problem.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Nov 09 2023 :  11:50:58 AM  Show Profile  Reply with Quote
So much for that theory.

If you want to "force" an IDE symbol database rebuild, in the same folder as your SLN file there should be a ".vs" folder, which will contain IDE generated project specific files. You could try renaming, or even just deleting this to see if it makes any difference. It will be re-generated next time you load the solution.

Beyond this, when you have time, can you please try the test profile, to see if that has any effect? It is possible the effect is profile and solution specific together.

zen is the art of being at one with the two'ness
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 09 2023 :  12:25:15 PM  Show Profile  Reply with Quote
Wow -You are a truly a star!!!!
Deleting the .vs folder did the trick.

I have the same problem in all my old "sample" solutions also.
Deleting .vs folder fixes this there also.
So this is a solution-related thing.

Thank you so much for your support.
I would not have figured this one out by myself.

I don't know if you will go on finding out why it actually happens.
If so I will gladly help if I can.

Best regards
Mats

PS: I talked to a collegue about this. He did not used Peek Definition.
I showed him how to use it and then he had the same scrolling problem as me:-)
Now I could help out immediately.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19015 Posts

Posted - Nov 10 2023 :  08:11:40 AM  Show Profile  Reply with Quote
Thank you for the update. I would have expected telling the IDE to rebuild its symbol database to fix this, but obviously it doesn't. In older versions of Visual Studio you would occasionally get a problem where a corrupt IDE symbol database would cause problems, so this is where the idea came from, since outside of this directory, I am not sure what solution specific files could cause an odd problem like this.

The fact that you are seeing this across more than one solution, and more than one machine is odd, and suggests a trigger somewhere in the solution. But the problem seems to be with the IDE files themselves, which VA should never touch, or even know about, so I don't think this is something we can do much about inside VA.

So hopefully this is a reliable and simple solution that works well for you.

zen is the art of being at one with the two'ness
Go to Top of Page

matarn
Junior Member

Sweden
11 Posts

Posted - Nov 10 2023 :  09:46:07 AM  Show Profile  Reply with Quote
It works very well and I am happy!
Again thanks for your help.
Over and out.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000