Jump to content
  • Advertisement
Sign in to follow this  
formalproof

Intellisense not working

This topic is 3322 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Sometimes after making changes to my program Visual C++'s Intellisense will stop working and I cannot access function definitions from the drow-down menu, forcing me to scroll the code manually to find them. I have absolutely no idea what is causing the error. My program compiles just fine, and I get no warnings. I've tried deleting the debug database (vc90.pdb) but it won't help either. I can restore an old version of the code where Intellisense is still working, but after a while (randomly, it seems) it will break up again. Any idea what could be wrong? I'm using Visual C++ 2008.

Share this post


Link to post
Share on other sites
Advertisement
Intellisense data is stored in a .ncb file in the same path as your solution file. Exiting VS, deleting this file, then reloading your solution is the standard fix for Intellisense crap-outs.

As for why it happens... long story short, parsing C++ is a righteous bitch, so occasionally the Intellisense parser just goes insane for a while. Not much way around it besides using a different language [wink]

Share this post


Link to post
Share on other sites
We just had a thread about this recently. I can't seem to find it though so I'll just come out and say it: Intellisense more or less sucks for C++. C++ is a hard language to parse and Intellisense really struggles with it. There is a plug-in called Visual Assist that helps though. From what I hear, Visual Assist is the best thing on the planet. It's not free though, and if you have the Express Edition you can't use plug-ins. If you delete the *.ncb file (the Intellisense Database), it forces VS to rebuild the Intellisense database which can help you out when it breaks.

[edit]

ninja'd++;

Share this post


Link to post
Share on other sites
One time I had a particular cpp file that would never have any intellisense at all. I deleted my ncb's multiple times, rebuilt the project a few times, always quitting out of VS in between. It was completely bizzare. I ended up removing this one line... an extern, I think, compiling, and voila! Intellisense was back. I think I may have even put it back after that and it was still working. So, it appears to me that occasionally intellisense can get "tripped up" on more complex expressions; try moving them around, deleting them, or somesuch and see if stuff works. Of course, it sounds like you may be having a global issue; which is probably more related to your ncb's.

Share this post


Link to post
Share on other sites
Deleting the .ncb file didn't help... Fortunately I currently only have the problem in one class, so although it's very annoying I guess it's manageable. I'm going to try breaking the class into smaller pieces and see if that will work. Thanks to everyone for answering!

PS. I really wish the Visual C++ development team would do its job and fix bugs like this...

Share this post


Link to post
Share on other sites
If you are using precompiled headers you may want to add the path to the directory where the StdAfx.h (for example) is found to the 'Additional Include Directories' in 'Properties/Config Prop/C/C++/General', even if that is the default directory for your project, if you dont intellisense doesnt seem to pick up methods etc in sub directories correctly. I was having all sorts of issues with not being able to goto definitions and not seeing source in the code definition window

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!