Skip to content

Cannot see inline method descriptions. #13089

@alexpalco

Description

@alexpalco

Environment

  • OS and Version:

Mac OS Sonoma 14.12.1

  • VS Code Version:

Version: 1.96.2 (Universal)

  • C/C++ Extension Version:

Identifier
ms-vscode.cpptools
Version
1.22.11
Last Updated
2024-12-30, 10:54:57
Size
211.0 MB

  • If using SSH remote, specify OS of remote machine:

Bug Summary and Steps to Reproduce

Bug Summary:

Cannot see inline method descriptions.

Steps to reproduce:

  1. Follow the steps in https://code.visualstudio.com/docs/cpp/config-clang-mac
  2. Try to explore Explore IntelliSense

Expected behavior:

Inline method description appears.

Image

Actual behavior:

Image

Configuration and Logs

{
    "configurations": [
        {
            "name": "Mac",
            "includePath": [
                "${workspaceFolder}/**",
                "/usr/local/include/**",
                "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1"
            ],
            "macFrameworkPath": [
                "/System/Library/Frameworks",
                "/Library/Frameworks"
            ],
            "compilerPath": "/opt/homebrew/Cellar/gcc/14.2.0_1/bin/g++-14",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "intelliSenseMode": "macos-gcc-arm64"
        }
    ],
    "version": 4
}

C/C++: Log diagnostics -> Empty

Other Extensions

No other extensions installed.

Additional context

No response

Activity

sean-mcmanus

sean-mcmanus commented on Dec 31, 2024

@sean-mcmanus
Contributor

@alexpalco This appears to be an issue with the VS Code UI itself and how it decides to render the UI text. The repro is unrelated to "inline" functions and can occur with non-inline functions or not occur with inline functions. The comlete UI text is also visible if you hover over it.

It repros whenever there is an overload (i.e. the name has \n in it) and the name has too many characters such that it can't be rendered without going to the next line, such as with this code below:

int f1234567891234567890123456789(int i) { return 0; }
int f1234567891234567890123456789(int i, int j) { return 0; }

Image

With one less character it is okay:

int f123456789123456789012345678(int i) { return 0; }
int f123456789123456789012345678(int i, int j) { return 0; }

Image

Did you want to file a bug on VS Code at https://github.com/microsoft/vscode/issues or did you want us to file a bug? Or did you have an idea on how we could modify the completion text such that the bug no longer repros?

added
Visual Studio CodeCaused by (or depends on changes from) VS Code
and removed
investigate: reproThis issue's repro steps needs to be investigated/confirmed
on Dec 31, 2024
alexpalco

alexpalco commented on Dec 31, 2024

@alexpalco
Author

Hi @sean-mcmanus , many thanks for your prompt response. So at first I thought the issue was with the C++ plugin, like it was not able to go thru the headers and populate the intelisense database properly. Since this is due to how VS Code treats lines with many characters then it would make sense to file a bug with VS Code. I wonder though if this is the case in this scenario, this is the code in question is the taken from the VSCode site itself. https://code.visualstudio.com/docs/cpp/config-clang-mac

#include <iostream>
#include <vector>
#include <string>

using namespace std;

int main()
{
    vector<string> msg{"Hello", "C++", "World", "from", "VS Code", "and the C++ extension!"};

    // Issue is here, no method description for msg.assign or others
    msg.a

    for (const string &word : msg)
    {
        cout << word << " ";
    }
    cout << endl;
}

Would be good to know from Mac OS users using VS Studio and the plugin if they have access to such comments to begin with. I also spotted this post in stack overflow from 2 yers ago btw, the OP had the same issue with showing function documentation. https://stackoverflow.com/questions/73326790/visual-studio-code-intellisense-doesnt-show-function-documentation-for-c?rq=3.

If it ever got fixed i might have just come back as a regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @alexpalco@sean-mcmanus

        Issue actions

          Cannot see inline method descriptions. · Issue #13089 · microsoft/vscode-cpptools