{"id":4023,"date":"2010-03-09T14:35:00","date_gmt":"2010-03-09T14:35:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vcblog\/2010\/03\/09\/intellisensebrowsing-options-in-vc-2010\/"},"modified":"2019-02-18T18:45:37","modified_gmt":"2019-02-18T18:45:37","slug":"intellisensebrowsing-options-in-vc-2010","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/cppblog\/intellisensebrowsing-options-in-vc-2010\/","title":{"rendered":"IntelliSense\/Browsing options in VC++ 2010"},"content":{"rendered":"<p><font face=\"Calibri\"><\/p>\n<p class=\"MsoNormal\"><font size=\"3\">Now that Dev10 is getting close to release I want to describe in detail the various options we have included for controlling browsing and IntelliSense in VC++.&nbsp; Note:&nbsp; All information here is specifically about C and C++ and does not apply to C# or VB.&nbsp; Some of the information contained in this blog will be available as part of our documentation, although I go into more detail in some areas.<\/font><\/p>\n<p class=\"MsoNormal\"><font size=\"3\">We have significantly changed how browsing and IntelliSense are implemented as compared with previous versions of VC.&nbsp; Many of you may be familiar with the \u201cNCB\u201d file which was previously used for browsing and IntelliSense.&nbsp; This file is no longer created or used.&nbsp; Instead, we create an \u201cSDF\u201d file, which is used for browsing features and some small parts of IntelliSense.&nbsp; The SDF file is a SQL Server Compact database file.&nbsp; For more detail on the parsing model, see an earlier blog of mine on <\/font><a href=\"http:\/\/blogs.msdn.com\/vcblog\/archive\/2008\/02\/29\/intellisense-part-2-the-future.aspx\"><font color=\"#0000ff\" size=\"3\">IntelliSense, Part 2<\/font><\/a><font size=\"3\">.<\/font><\/p>\n<p class=\"MsoNormal\"><i><font size=\"3\">Note: If you want to take a look at the contents of the SDF file, you can actually open it using Visual Studio\u2019s database support.&nbsp; Perhaps I\u2019ll write another blog on that.<\/font><\/i><\/p>\n<p class=\"MsoNormal\"><font size=\"3\">Here is a screenshot showing the first half of the relevant options for controlling browsing and IntelliSense.&nbsp; The others are scrolled out of view in the right-hand pane.&nbsp; This dialog is accessed from the \u201cTools|Options\u201d menu item.<\/font><\/p>\n<p><\/font><\/p>\n<p class=\"MsoNormal\"><img decoding=\"async\" height=\"366\" src=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/9\/2019\/02\/Intellisense-Browsing%20options.png\" width=\"628\"><\/p>\n<p><font face=\"Calibri\" size=\"3\"><\/p>\n<p class=\"MsoNormal\">These options are arranged alphabetically into 5 categories: Browsing\/Navigation, Diagnostic Logging, Fallback Location, IntelliSense, and References.<\/p>\n<p class=\"MsoNormal\">First of all, we have heard from some people that they would prefer to see positively stated options (i.e. Enable xxx) rather than negatively stated options (i.e. Disable xxx).&nbsp; I can appreciate this perspective, but I won\u2019t go into all the reasons why it was done this way.&nbsp; It was not an arbitrary or capricious choice.<\/p>\n<h2><span><font size=\"5\"><font face=\"Cambria\"><\/p>\n<h2><span><u>Browsing\/Navigation<\/u><\/span><\/h2>\n<p><\/font><\/font><\/span><\/h2>\n<h2><span><font face=\"Cambria\">Disable Database<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">This option completely disables any use of the browsing database (SDF).&nbsp; The database will not be created or opened.&nbsp; It disables all of the other Browsing\/Navigation options and it disables all IntelliSense features except for #include Auto Complete.&nbsp; In previous versions, this is equivalent to deleting feacp.dll.<\/p>\n<h2><span><font face=\"Cambria\">Disable Database Updates<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">The database will be opened read-only and no updates will be performed as files are edited.&nbsp; Most features will still work although as edits are made, the data will become stale and you will get incorrect results.&nbsp; If the SDF does not exist and you open a solution while this option is set, the SDF will get created, but it will contain no data about the solution.<\/p>\n<h2><span><font face=\"Cambria\">Disable Database Auto Updates<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">The code browsing database will not be automatically updated when source files are modified.&nbsp; However, if you select \u201cRescan Solution\u201d from the project\u2019s context menu in Solution Explorer, all out of date files will be checked and the database updated.<\/p>\n<h2><span><font face=\"Cambria\">Disable Implicit Files<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">The code browsing database will not collect data for files not specified in a project.&nbsp; A project contains source files and header files that are explicitly specified.&nbsp; Implicit files are files that are #included\u2019d by explicit files (i.e. afxwin.h, windows.h, atlbase.h, etc).&nbsp; Normally, the system will find these files and index them as well for various browsing features (including Navigate To).&nbsp; When this option is selected, those files will not be indexed and some features will not be available for those files.&nbsp; Selecting this option also implicitly selects \u201cDisable Implicit Cleanup\u201d and \u201cDisable External Dependencies\u201d.<\/p>\n<h2><span><font face=\"Cambria\">Disable Implicit Cleanup<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">The code browsing database will not clean up no longer referenced implicit files.&nbsp; This option prevents implicit files from being removed from the database when they are no longer used.&nbsp; For example, if I add a #include referencing mapi.h to one of my source files, mapi.h will be found and indexed.&nbsp; If I then remove the #include, and there are no other references to that file, information on it will eventually be removed (see Rescan Solution Interval) unless this option is set.&nbsp; This setting does not affect an explicit \u201cRescan Solution\u201d.<\/p>\n<h2><span><font face=\"Cambria\">Disable External Dependencies<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">The \u2018External Dependencies\u2019 folder for each project will not be created\/updated.&nbsp; If you look in Solution Explorer, there is an External Dependencies folder under each project.&nbsp; This folder contains all implicit files for that project.&nbsp; If this option is set, that folder will not show up.<\/p>\n<h2><span><font face=\"Cambria\">Recreate Database<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Recreate the code browsing database from scratch upon the next solution load.&nbsp; This option will cause the next solution load to delete the SDF database file, thus causing it to be recreated and all files indexed.&nbsp; The SQL Compact database code is extremely reliable, but given the issues we used to have with NCB files becoming corrupt, we wanted to expose this in the IDE rather than requiring manual deletion of the SDF file in the case where it is necessary.<\/p>\n<h2><span><font face=\"Cambria\">Rescan Solution Interval<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">A \u2018Rescan Solution Now\u2019 job will be scheduled every \u2018value\u2019 minutes.&nbsp; The value must be between 0 and 5000.&nbsp; The default for this is 60 minutes.&nbsp; During a rescan solution, file timestamps will be checked to see if a file was changed outside of the IDE (changes made in the IDE are automatically tracked and files are updated) and implicit files will be checked to see if they are all still referenced.&nbsp; Personally, I like to set this value to 240 minutes or longer as I\u2019m not usually making changes like this.<\/p>\n<p class=\"MsoNormal\">Note:&nbsp; There was a bug in the release candidate where the IDE would take focus every hour when the rescan solution kicked off, but this has been fixed.<\/p>\n<h2><span><font size=\"5\"><font face=\"Cambria\"><\/p>\n<h2><span><u>Diagnostic Logging<\/u><\/span><\/font><\/font><\/span>&nbsp;<\/h2>\n<\/h2>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"MsoNormal\">These logging options are provided in case the product team or support needs to collect some advanced information to diagnose a customer issue.&nbsp; The logging information is not really actionable for users and we recommend you leave it disabled. The output is deeply specific to our internals.<\/p>\n<h2><span><font face=\"Cambria\">Enable Logging<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Emit information to Output Window for easier debugging of IntelliSense and browsing database configuration.&nbsp; This is the master switch to turn on collection of information.<\/p>\n<h2><span><font face=\"Cambria\">Logging Level<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">A number from 0 to 5, where 0 is most quiet and 5 is most verbose.&nbsp; Not much more to say about this.<\/p>\n<h2><span><font face=\"Cambria\">Logging Filter<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">A filter for logging events. Sum of any: General = 1, Idle = 2, WorkItem = 4, Intellisense = 8, and ACPerf = 16, ClassView = 32.&nbsp; May require exit and reopen of Visual Studio.&nbsp; These are just bit flags indicating what systems we will collect information from.<\/p>\n<h2><span><font size=\"5\"><font face=\"Cambria\"><\/p>\n<h2><span><u>Fallback Location<\/u><\/span><\/font><\/font><\/span>&nbsp;<\/h2>\n<\/h2>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"MsoNormal\">The fallback location is the location to put the SDF and IntelliSense support files (i.e. iPCH) when the primary location (same directory as solution) is not used.&nbsp; This could be because the user does not have the privileges to write to the solution directory or the solution directory is on a slow device.&nbsp; The default fallback location is in the user\u2019s temp directory.<\/p>\n<h2><span><font face=\"Cambria\">Always Use Fallback Location<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Indicates that browsing database and IntelliSense files should always be stored in your \u2018Fallback Location\u2019, not next to the .sln file.&nbsp; The IDE will never try to put the SDF or iPCH files next to the solution directory and will always use the fallback location.<\/p>\n<h2><span><font face=\"Cambria\">Do Not Warn If Fallback Location Used<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Do not inform or prompt you if a \u2018Fallback Location\u2019 is used.&nbsp; Normally, the IDE will let you know if it had to use the fallback location.&nbsp; This option turns off that warning.<\/p>\n<h2><span><font face=\"Cambria\">Fallback Location<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">This value is used as a secondary location to store the browsing database or IntelliSense files.&nbsp; If empty, this will default to your temporary directory.&nbsp; The IDE will create a subdirectory under the specified path (or the temp directory) includes the name of the solution along with a hash of the full path to the solution, which avoids issues with solution names being identical.<\/p>\n<h2><span><font size=\"5\"><font face=\"Cambria\"><\/p>\n<h2><span><u>IntelliSense<\/u><\/span><\/h2>\n<p><\/font><\/font><\/span><\/h2>\n<h2><span><font face=\"Cambria\">Auto Quick Info<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Automatically display QuickInfo tooltips when hovering over text in the editor.&nbsp; This option is unusual in that it is stated \u201cpositively\u201d.&nbsp; This is because this option already existed in previous version of VC.<\/p>\n<h2><span><font face=\"Cambria\">Disable IntelliSense<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Disable all IntelliSense features.&nbsp; The IDE will not create VCPkgSrv.exe processes to service IntelliSense requests and no IntelliSense features will work (QuickInfo, Member List, Auto Complete, Param Help).&nbsp; This does not disable browsing features that rely solely on the database (NavBar, ClassView, Property window, and others).<\/p>\n<h2><span><font face=\"Cambria\">Disable Auto Updating<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">IntelliSense updating will be delayed until an actual request for IntelliSense.&nbsp; This can result in a longer execution time of the first IntelliSense operation on a file, but it may be helpful to set this option on very slow or resource constrained machines.&nbsp; Selecting this option also selects \u201cDisable Error Reporting\u201d and \u201cDisable Squiggles\u201d.<\/p>\n<h2><span><font face=\"Cambria\">Disable Error Reporting<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Disables reporting of IntelliSense errors through squiggles and the Error List window.&nbsp; Also disables the background parsing associated with error reporting.&nbsp; Selecting this option also selects \u201cDisable Squiggles\u201d.<\/p>\n<h2><span><font face=\"Cambria\">Disable Squiggles<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Disable IntelliSense error squiggles.&nbsp; The red \u201csquiggles\u201d will not show in the editor window, although the error will still show up in the Error List window.<\/p>\n<h2><span><font face=\"Cambria\">Disable #include Auto Complete<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Disables automatic completion of #include statements.<\/p>\n<h2><span><font face=\"Cambria\">Use Forward Slash in #include Auto Complete<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Sets forward slash \u2018\/\u2019 to be the #include Auto Complete folder delimiter.&nbsp; The default delimiter is backslash \u2018\\\u2019.&nbsp; The compiler can accept either, so use this option to select what your code base uses.<\/p>\n<h2><span><font face=\"Cambria\">Max Cached Translation Units<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">The maximum number of translation units that will be kept active at a time for IntelliSense requests.&nbsp; The value must be between 2 and 15.&nbsp; This number directly relates to the maximum number of VCPkgSrv.exe processes that will run (for a given Visual Studio instance).&nbsp; The default is 2 although if you have available memory, feel free to increase this value.&nbsp; For instance, I normally run at 5.&nbsp; If I am normally switching between 5 different source (.cpp) files, I won\u2019t be shutting down and relaunching vcpkgsrv processes as I switch.<\/p>\n<h2><span><font size=\"5\"><font face=\"Cambria\"><\/p>\n<h2><span><u>References<\/u><\/span><\/h2>\n<p><\/font><\/font><\/span><\/h2>\n<h2><span><font face=\"Cambria\">Disable Resolving<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">\u2018Find All References\u2019 will display raw textual search results instead of using IntelliSense to verify each candidate (faster).&nbsp; We default to setting this option and it was set this way pretty late in the development cycle as we just couldn\u2019t get the speed good enough that we were comfortable always trying to resolve candidates.&nbsp; If you want more accurate results, by all means, turn this off and for smaller solutions, it should work well for you.<\/p>\n<h2><span><font face=\"Cambria\">Hide Unconfirmed<\/font><\/span><\/h2>\n<p class=\"MsoNormal\">Hide unconfirmed items in the \u2018Find All References\u2019 results.&nbsp; If you unset the \u201cDisable Resolving\u201d option, you can use this option to hide unconfirmed items in the results.<\/p>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p class=\"MsoNormal\">Jim Springfield<\/p>\n<p class=\"MsoNormal\">VC++ Architect<\/p>\n<p class=\"MsoNormal\">&nbsp;<\/p>\n<p><\/font><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Now that Dev10 is getting close to release I want to describe in detail the various options we have included for controlling browsing and IntelliSense in VC++.&nbsp; Note:&nbsp; All information here is specifically about C and C++ and does not apply to C# or VB.&nbsp; Some of the information contained in this blog will be [&hellip;]<\/p>\n","protected":false},"author":289,"featured_media":35994,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[45,6,14,46,47],"class_list":["post-4023","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cplusplus","tag-browsing","tag-ide","tag-intellisense","tag-ipch","tag-sdf"],"acf":[],"blog_post_summary":"<p>Now that Dev10 is getting close to release I want to describe in detail the various options we have included for controlling browsing and IntelliSense in VC++.&nbsp; Note:&nbsp; All information here is specifically about C and C++ and does not apply to C# or VB.&nbsp; Some of the information contained in this blog will be [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/4023","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/users\/289"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/comments?post=4023"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/posts\/4023\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media\/35994"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/media?parent=4023"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/categories?post=4023"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/cppblog\/wp-json\/wp\/v2\/tags?post=4023"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}