Intellisense In Visual Studio Code



-->

IntelliSense is a code-completion aid that includes a number of features: List Members, Parameter Info, Quick Info, and Complete Word. These features help you to learn more about the code you're using, keep track of the parameters you're typing, and add calls to properties and methods with only a few keystrokes.

Many aspects of IntelliSense are language-specific. For more information about IntelliSense for different languages, see the topics listed in the See also section.

List Members

IntelliSense for cross-compiling The article is about configuring the C/C extension to provide proper IntelliSense (code completions) in Visual Studio Code when you compile for a different architecture than your development host machine. For example, when your host machine is. I have noticed a weird issue with Visual Studio 2019 v16.0.1 the IntelliSense about 'Using directive is unnecessary' normally grey is missing and type reference suggestion for missing using is not working. I also tried with Visual Studio 2019 Preview but no luck. I have tried the following: deleted.vs folder and restarted. Reinstalled Visual. I have noticed a weird issue with Visual Studio 2019 v16.0.1 the IntelliSense about 'Using directive is unnecessary' normally grey is missing and type reference suggestion for missing using is not working. I also tried with Visual Studio 2019 Preview but no luck. I have tried the following: deleted.vs folder and restarted. Reinstalled Visual.

A list of valid members from a type (or namespace) appears after you type a trigger character (for example, a period (.) in managed code or :: in C++). If you continue typing characters, the list is filtered to include only the members that begin with those characters or where the beginning of any word within the name starts with those characters. IntelliSense also performs 'camel case' matching, so you can just type the first letter of each camel-cased word in the member name to see the matches.

Intellisense In Visual Studio Code

After selecting an item, you can insert it into your code by pressing Tab or by typing a space. If you select an item and type a period, the item appears followed by the period, which brings up another member list. When you select an item but before you insert it, you get Quick Info for the item.

In the member list, the icon to the left represents the type of the member, such as namespace, class, function, or variable. For a list of icons, see Class View and Object Browser icons. The list may be quite long, so you can press PgUp and PgDn to move up or down in the list.

You can invoke the List Members feature manually by typing Ctrl+J, choosing Edit > IntelliSense > List Members, or by choosing the List Members button on the editor toolbar. When it is invoked on a blank line or outside a recognizable scope, the list displays symbols in the global namespace.

To turn List Members off by default (so that it does not appear unless specifically invoked), go to Tools > Options > All Languages and deselect Auto list members. If you want to turn off List Members only for a specific language, go to the General settings for that language.

You can also change to suggestion mode, in which only the text you type is inserted into the code. For example, if you enter an identifier that is not in the list and press Tab, in completion mode the entry would replace the typed identifier. To toggle between completion mode and suggestion mode, press Ctrl+Alt+Space, or choose Edit > IntelliSense > Toggle Completion Mode.

Parameter Info

Parameter Info gives you information about the number, names, and types of parameters required by a method, attribute generic type parameter (in C#), or template (in C++).

The parameter in bold indicates the next parameter that is required as you type the function. For overloaded functions, you can use the Up and Down arrow keys to view alternative parameter information for the function overloads.

When you annotate functions and parameters with XML Documentation comments, the comments will display as Parameter Info. For more information, see Supply XML code comments.

You can manually invoke Parameter Info by choosing Edit > IntelliSense > Parameter Info, by pressing Ctrl+Shift+Space, or by choosing the Parameter Info button on the editor toolbar.

Intellisense In Visual Studio Code

Quick Info

Quick Info displays the complete declaration for any identifier in your code.

When you select a member from the List Members box, Quick Info also appears.

You can manually invoke Quick Info by choosing Edit > IntelliSense > Quick Info, by pressing Ctrl+K, Ctrl+I, or by choosing the Quick Info button on the editor toolbar.

If a function is overloaded, IntelliSense may not display information for all forms of the overload.

You can turn Quick Info off for C++ code by navigating to Tools > Options > Text Editor > C/C++ > Advanced, and setting Auto Quick Info to false.

Complete Word

Complete Word completes the rest of a variable, command, or function name after you have entered enough characters to disambiguate the term. You can invoke Complete Word by choosing Edit > IntelliSense > Complete Word, by pressing Ctrl+Space, or by choosing the Complete Word button on the editor toolbar.

IntelliSense options

IntelliSense options are on by default. To turn them off, choose Tools > Options > Text Editor and deselect Parameter information or Auto list members if you do not want the List Members feature.

IntelliSense icons

The icons in IntelliSense can convey additional meaning with icon modifiers. These are stars, hearts, and locks layered on top of the object's icon that convey protected, internal, or private, respectively.

IconAccessibilityDescription
Public classAccess is not restricted.
Protected classAccess is limited to the containing class or types derived from the containing class.
Protected internal classAccess is limited to the current assembly or types derived from the containing class.
Internal classAccess is limited to the current assembly.
Private classAccess is limited to the containing class or types derived from the containing class within the current assembly. (Available since C# 7.2.)

Troubleshoot IntelliSense

The IntelliSense options may not work as you expect in certain cases.

The cursor is below a code error. You might not be able to use IntelliSense if an incomplete function or other error exists in the code above the cursor because IntelliSense might not be able to parse the code elements. You can resolve this problem by commenting out the applicable code.

The cursor is in a code comment. You can't use IntelliSense if the cursor is in a comment in your source file.

The cursor is in a string literal. You can't use IntelliSense if the cursor is in the quotation marks around a string literal, as in the following example:

Studio

The automatic options are turned off. By default, IntelliSense works automatically, but you can disable it. Even if automatic statement completion is disabled, you can invoke an IntelliSense feature.

See also

-->

The IntelliCode extension for Visual Studio Code provides artificial intelligence-assisted IntelliSense for Python, Java, TypeScript, and JavaScript. AI-assisted IntelliSense predicts the most likely correct API for the developer to use rather than just presenting an alphabetical list of members. It uses the developer's current code context and patterns to provide this dynamic list.

Supported languages

Html Intellisense In Visual Studio Code

Intellisense In Visual Studio Code

The supported languages for AI-assisted IntelliSense completions are:

  • Java
  • JavaScript and TypeScript
  • Python
  • SQL

Prerequisites

To install the extension, you need Visual Studio Code October 2018 Release 1.29 or later.

To get AI-assisted IntelliSense for Java, you need Java 8 Update 151 or higher. (If you have a previous Java 8 version, you'll see the error java.security.InvalidKeyException: Illegal key size, and IntelliCode AI-assisted IntelliSense recommendations won't work.)

Troubleshoot

This section provides some troubleshooting tips for common problems.

No completion lists

If you don't see any IntelliSense completion lists, try these steps:

  • Look at the output window for the language you're trying to use and see if there's an actionable error message.

  • Try disabling the IntelliCode extension and see if you get any IntelliSense completions. If you do see IntelliSense completions with IntelliCode disabled, look through the existing issues or open a new one.

You can also try the following troubleshooting steps for your language:

Ionic Intellisense In Visual Studio Code

  • JavaScript / TypeScript: VS Code IntelliSense troubleshooting or JavaScript IntelliSense in VS Code

  • Java: How to troubleshoot and contribute to the Java language server

  • Python: Meta issue for the Python language server

No starred suggestions

If you see IntelliSense completion lists, but none of the completion items are starred, look at the VS IntelliCode output window.

  • Is there a network error?

    • Are you able to access the internet normally?

    • Are you behind a proxy or restrictive firewall?

    When using IntelliCode, you may see the error message 'Couldn't download IntelliCode model. Please check your network connectivity or firewall settings.', or see similar messages in the IntelliCode output window pane in Visual Studio Code. You might also see no IntelliCode starred suggestions. If you connect to the internet through a proxy or restrictive firewall, that may cause these issues.

    As a first step, try updating to Visual Studio Code 1.30 or later, and turning on network proxy support .

    If turning on network proxy support doesn't work for you, check the corresponding github issue and let us know more.

  • Is there an actionable message that helps?

If you're still facing a problem, look through the existing issues or open a new one.

Provide feedback

If you encounter a problem, you can browse existing issues and upvote them using a 👍 'thumbs up' reaction. If you don't see your particular problem, click the Send feedback about > This product button at the bottom of this page to create a new issue. Include any Output window log entries from Visual Studio IntelliCode, Python, Java, JavaScript, TypeScript, or SQL with the bug.

Intellisense In Visual Studio Code

See also