Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inline Macro source action not available and keyboard shortcut does not work! #13226

Open
amal-khailtash opened this issue Feb 3, 2025 · 3 comments
Assignees
Labels
bug Language Service more info needed The issue report is not actionable in its current state

Comments

@amal-khailtash
Copy link

Environment

  • OS and Version: Red Hat Enterprise Linux 8.10 (Ootpa) - Linux x64 4.18.0-553.22.1.el8_10.x86_64
  • VS Code Version: Version: 1.96.3
  • C/C++ Extension Version: 1.23.5
  • If using SSH remote, specify OS of remote machine: N/A

Bug Summary and Steps to Reproduce

Bug Summary:

We have been using "Inline Macro" feature extensively for debugging our macros. Seems like it stop working recently!

Steps to reproduce:

The Source Action does not show the option to expand the macro:

Image

I also used the keyboard shortcut CTRL+k, CTRL+i, but that does not do anything other than showing the bubble on top of the macro. I also could NOT find any command to do that in the Command Palette.

Expected behavior:

I expected the macro to be inlined/expanded as before.

Configuration and Logs

-------- Diagnostics - 2/3/2025, 2:23:46 PM
Version: 1.23.5
Current Configuration:
{
    "name": "Linux",
    "defines": [],
    "cStandard": "c17",
    "intelliSenseMode": "linux-clang-x64",
    "cppStandard": "c++14",
    "intelliSenseModeIsExplicit": false,
    "cStandardIsExplicit": false,
    "cppStandardIsExplicit": true,
    "mergeConfigurations": false,
    "compilerPathIsExplicit": true,
    "browse": {
        "limitSymbolsToIncludedHeaders": true,
        "databaseFilename": "${workspaceFolder}/.vscode/cache/browse.vc.db"
    }
}
Modified Settings:
{
    "C_Cpp.default.cppStandard": "c++14",
    "C_Cpp.default.browse.databaseFilename": "${workspaceFolder}/.vscode/cache/browse.vc.db",
    "C_Cpp.files.exclude": {
        "**/.vscode": true,
        "**/.vs": true,
        "**/.git": true
    },
    "C_Cpp.clang_format_sortIncludes": false,
    "C_Cpp.intelliSenseCachePath": "${workspaceFolder}/.vscode/cache",
    "C_Cpp.intelliSenseCacheSize": 8192,
    "C_Cpp.autoAddFileAssociations": false
}
Additional Tracked Settings:
{
    "editorTabSize": 4,
    "editorInsertSpaces": true,
    "editorAutoClosingBrackets": "languageDefined",
    "filesEncoding": "utf8",
    "filesAssociations": {
        "*.dj": "ruby",
        "*.rdl": "ruby",
        "*.tdl": "ruby",
        "*.uvmf": "yaml",
        "*.erb": "systemverilog",
        "*.inc": "cpp",
        "*.ipp": "cpp",
        "*.tcc": "cpp",
        "algorithm": "cpp",
        "allocator": "cpp",
        "any": "cpp",
        "array": "cpp",
        "atomic": "cpp",
        "basic_ios": "cpp",
        "basic_iostream": "cpp",
        "basic_istream": "cpp",
        "basic_ostream": "cpp",
        "bit": "cpp",
        "bitset": "cpp",
        "cassert": "cpp",
        "cctype": "cpp",
        "cerrno": "cpp",
        "cfenv": "cpp",
        "charconv": "cpp",
        "char_traits": "cpp",
        "chrono": "cpp",
        "cinttypes": "cpp",
        "clocale": "cpp",
        "cmath": "cpp",
        "codecvt": "cpp",
        "complex": "cpp",
        "condition_variable": "cpp",
        "csetjmp": "cpp",
        "csignal": "cpp",
        "cstdarg": "cpp",
        "cstddef": "cpp",
        "cstdint": "cpp",
        "cstdio": "cpp",
        "cstdlib": "cpp",
        "cstring": "cpp",
        "ctime": "cpp",
        "cuchar": "cpp",
        "cwchar": "cpp",
        "cwctype": "cpp",
        "deque": "cpp",
        "exception": "cpp",
        "filesystem": "cpp",
        "forward_list": "cpp",
        "fstream": "cpp",
        "functional": "cpp",
        "future": "cpp",
        "initializer_list": "cpp",
        "iomanip": "cpp",
        "ios_base": "cpp",
        "ios": "cpp",
        "iosfwd": "cpp",
        "iostream": "cpp",
        "istream": "cpp",
        "iterator_traits": "cpp",
        "iterator": "cpp",
        "limits": "cpp",
        "list": "cpp",
        "locale": "cpp",
        "map": "cpp",
        "memory_resource": "cpp",
        "memory": "cpp",
        "mutex": "cpp",
        "new": "cpp",
        "numeric": "cpp",
        "optional": "cpp",
        "ostream": "cpp",
        "queue": "cpp",
        "random": "cpp",
        "ratio": "cpp",
        "regex": "cpp",
        "scoped_allocator": "cpp",
        "set": "cpp",
        "shared_mutex": "cpp",
        "sstream": "cpp",
        "stack": "cpp",
        "stdexcept": "cpp",
        "streambuf": "cpp",
        "streamdefs": "cpp",
        "string_view": "cpp",
        "string": "cpp",
        "strstream": "cpp",
        "system_error": "cpp",
        "systemc.h": "cpp",
        "systemc": "cpp",
        "thread": "cpp",
        "tuple": "cpp",
        "type_traits": "cpp",
        "typeindex": "cpp",
        "typeinfo": "cpp",
        "unordered_map": "cpp",
        "unordered_set": "cpp",
        "utility": "cpp",
        "valarray": "cpp",
        "variant": "cpp",
        "vector": "cpp"
    },
    "filesExclude": {
        "**/.git": true,
        "**/.svn": true,
        "**/.hg": true,
        "**/CVS": true,
        "**/.DS_Store": true,
        "**/Thumbs.db": true,
        "**/.ruby-lsp": true
    },
    "filesAutoSaveAfterDelay": false,
    "editorInlayHintsEnabled": true,
    "editorParameterHintsEnabled": true,
    "searchExclude": {
        "**/node_modules": true,
        "**/bower_components": true,
        "**/*.code-search": true,
        "**/.ruby-lsp": true
    },
    "workbenchSettingsEditor": "ui"
}
cpptools version (native): 1.23.5.0
Current database path: .../.vscode/cache/browse.vc.db
Translation Unit Mappings:
[ ]:
Translation Unit Configurations:
[ ]
    Process ID: 2239963
    Memory Usage: 126 MB
    Compiler Path: .../bin/g++
    Includes:
        ...
    System Includes:
        ...
        /usr/include
    Standard Version: c++14
    IntelliSense Mode: linux-gcc-x64
    Other Flags:
        --g++
        --gnu_version=100200
[ ]
    Process ID: 2240188
    Memory Usage: 131 MB
    Compiler Path: .../bin/g++
    Includes:
        ...
    System Includes:
        ...
        /usr/include
    Standard Version: c++14
    IntelliSense Mode: linux-gcc-x64
    Other Flags:
        --g++
        --gnu_version=100200
Total Memory Usage: 257 MB

------- Workspace parsing diagnostics -------
Number of files discovered (not excluded): 290345
Number of files parsed: 2963

Other Extensions

No response

Additional context

No response

@sean-mcmanus sean-mcmanus self-assigned this Feb 3, 2025
@sean-mcmanus sean-mcmanus added bug Language Service more info needed The issue report is not actionable in its current state labels Feb 3, 2025
@sean-mcmanus
Copy link
Contributor

@amal-khailtash It's working for me. Does it work for you with 1.22.11? Are you able to provide any more repro info? Does it repro in only certain files? Does it repro with the example below?

Image

#define FOO(x) x

int main()
{
    return FOO(0);
}

@amal-khailtash
Copy link
Author

I downgraded to that version, but I still see this:

Image

The "Loading..." message does not go away for a long time for me to see the Light Bulb. It eventually shows:

Image

It works for this simple case. My macro is in different header files and it seems Intellisense "Loading..." message never terminates. Our code base is big, and I have excluded a number of directories and files. But I still experience this slowness and macros not working.

Image

Any suggestions?

@amal-khailtash
Copy link
Author

If I use <CTRL + SHIFT + R>, <CTRL + I>, I get this:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Language Service more info needed The issue report is not actionable in its current state
Projects
Status: No status
Development

No branches or pull requests

2 participants