Skip to content

Cannot find C++20 module files with relative path in commpile_commands.json #12944

@Juvwxyz

Description

@Juvwxyz

Environment

  • OS and Version: Win11 24H2
  • VS Code Version: 1.95.2
  • C/C++ Extension Version: 1.23.1

Bug Summary and Steps to Reproduce

Intellisense says it cannot find module file:
Image

This path is provided from compile_commands.json generated by xmake. It's a relative path to the "directory" property:
Image

If I edit the path to absolute path manually, intellisense works just fine.

Configuration and Logs

Configuration:

{
    "version": 4,
    "configurations": [
        {
            "name": "win32",
            "compileCommands": "${workspaceFolder}/compile_commands.json"
        }
    ]
}

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions