Forums
Intellisense issues - Printable Version

+- Forums (http://www.scratchpadgames.net/forums)
+-- Forum: **FREE*** Visual Studio Dev for Linux (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=19)
+--- Forum: Getting started (http://www.scratchpadgames.net/forums/forumdisplay.php?fid=20)
+--- Thread: Intellisense issues (/showthread.php?tid=374)



Intellisense issues - Brian Beuken - 03-18-2019

Oh this is a good one, one of my students was struggling with lots of errors being tossed out that it could not find GLuint or glm. It appearred to be unable to find the files and associated variable types.

This in part was true, however it was Visual Studio's intellisense that was getting things mixed up and in his case he had a genuine minor code error, which resulted in a failure to compile. His error list however was throwing up all the cannot find file issues and he assumed that there was some issue there and didn't get into his code

So his true minor error, was hidden under dozens of other errors, which in fact were not errors, but reports from intellisense. scary.

The error itself was highlighted clearly in his compiler output window, since it reported the compilers issues, which is better to check than the error window which reports visual studios issues, including intellisense. You can filter just the build errors though.

The reasons for this are somewhat annoying. When you set up a connection to a Pi, or other linux system it is supposed to syncronise the files on the Pi and keep copies of the include files on your Pc to allow intelisense to work, but the connection manager only loads the usr directory....which excludes any addition directories, like bullet or glm as well as some directories unique to Raspbian, such as opt/vc/include which is where GLES2 lives...... so these files appeared to be unreachable and unloadable to VS2017. But when sent to the target to compile they happyily find the directories where we say they are in the directory lists sent with the make file

The sync really should pull in all directories used by the project, so this is an error in the system I will report to Microsoft, perhaps its been fixed in VS 2019. I will review the preview copy

Microsoft do suggest you copy other folders manually, but really its not an obvious fix and I hope they can correct this to allow for an automatic update, like VisualGDB does
https://docs.microsoft.com/en-us/cpp/linux/configure-a-linux-project?view=vs-2017


RE: Intellisense issues - Brian Beuken - 03-18-2019

And as a follow up, I installed the preview version of VisualStudio 2019 and happy to say it is indeed more aware of the other directories the project references and it update the directories your project uses. though it does load all the base directories too, like /pi/home
Might be wise to specify /pi/home/glm to reduce the number of files your PC keeps track of.

I probably won't update to 2019 just yet, I like to give new version of VS a bit of time to settle and clear out the bugs


RE: Intellisense issues - Brian Beuken - 02-07-2020

just an update.... that sync is VERY unpredictable, I don't know how they work out what files to pull over to the PC for intellisense to work but it seems to fail miserably to guess the files you need...then it does, then it dosn't....very hit and miss.

I can't for the life of me get it to pull the GLM files over even though I clearly reference them in the projects directory paths and in code. Although it did eventually pull the home directory, which contains GLM, but then intillisense steadfastly refused to accept any concept of knowing what GLM was...it compiled of course, since the compiler is on the target and the directories were set correctly to reference includes and libs.

sigh...this is why I use Visual GDB. So much easier to get up and get running and not have to worry about such things


RE: Intellisense issues - jomoengineer - 02-11-2020

What version  of VS are you running?  It looks like there was a fix for a similar issue in VS 2019.

https://developercommunity.visualstudio.com/content/problem/474753/remote-headers-intellisense-manager-never-finishes.html


RE: Intellisense issues - Brian Beuken - 02-12-2020

latest 2019 with update, its simply not a stable fix. It syncs fine, but not all the directories that are listed, and its a bit random which ones it links. It has issues with a GLM directory off the Home dir and can't see any X11 or GLES header files, desprite the usr/lib (or opt/vc) directories getting pulled.


RE: Intellisense issues - jomoengineer - 02-12-2020

Have you checked the permission and ownership of the files and folders where the files that are not being pulled are?


RE: Intellisense issues - Brian Beuken - 02-12-2020

No, but since they are not being written to, I don't think that should be an option, we only read them into the PC for intellisense reference
Have you used the Visual Studio for Linux with intellisense working totally?


RE: Intellisense issues - Brian Beuken - 02-12-2020

Working with my students, and trying it out on a couple of other boards the issue seems mostly contained within ARM64 boards and would seem to be a bug of some kind in the VS2019 intellisense... very irritating.

32 bit ARM boards don't appear to have an issue, and intellisense works fine, you may have to update the folders manually if you add more than home and usr, but otherwise its doing its job just fine.

A, not ideal, work around, is to edit your code in ARM mode, which intellisense is happy with, and before building and deploying, set to ARM64 as it builds fine on the 3 ARM64 systems I tried with tonight.

I've put a note on the Visual Studio developers forum, and on the Nvidia Jetson forums, to see if anyone can give a solution (it might be nothing more than a box that needs ticking tucked away in a small drop down)


RE: Intellisense issues - Brian Beuken - 02-14-2020

It appears that MS have fixed this issue internally and a release with the fix will be available soon. Make sure you update to the latest version.


RE: Intellisense issues - Brian Beuken - 02-21-2020

yes the latest version of Visual Studio is now much happier with intellisense, they fixed the ARM64 bug, it still has a few issues with directories but you can use RemoteProjDir instead of ProjectDir to get a bit more direct control over where your code builds and runs from.