Skip to content

Go to Definition does not work even though the C/C++ extension is installed. C file index is not working. #13819

@tranthanh1699

Description

@tranthanh1699

Environment

  • OS and Version: Windows 11 24H2
  • VS Code Version: 1.102.3
  • C/C++ Extension Version: 1.26.3

Bug Summary and Steps to Reproduce

Bug Summary:

Steps to reproduce:

  1. I open my C project in VS Code
  2. I hold Ctrl + click to go to the function in the C file, but it does not work. I try with F12, but the issue still happens.

Expected behavior:
I expect when I go to the function, vscode will jump to the funtion detail

Line 167 Function I want to go

Image

Line 57 Function location in the same C file but VSCode can not find it

Image

Configuration and Logs

{
    "configurations": [
        {
            "name": "nRF Connect SDK",
            "includePath": [
                "${workspaceFolder}/**",
                "${workspaceFolder}/src/**",
                "${workspaceFolder}/build/**",
                "${workspaceFolder}/build/zephyr/include/**",
                "${workspaceFolder}/build/zephyr/include/generated/**",
                "${env:ZEPHYR_BASE}/include/**",
                "${env:ZEPHYR_BASE}/lib/libc/newlib/include/**",
                "${env:ZEPHYR_BASE}/arch/arm/include/**",
                "${env:ZEPHYR_BASE}/soc/arm/**",
                "${env:ZEPHYR_BASE}/boards/arm/**",
                "${env:NRF_BASE}/include/**",
                "${env:NRF_BASE}/modules/**",
                "${env:NRF_BASE}/lib/**",
                "C:/ncs/v*/zephyr/include/**",
                "C:/ncs/v*/nrf/include/**",
                "C:/ncs/v*/modules/**",
                "C:/ncs/toolchain/*/arm-zephyr-eabi/arm-zephyr-eabi/include/**"
            ],
            "defines": [
                "CONFIG_BUILD_WITH_TFM",
                "CONFIG_PSA_CRYPTO_DRIVER_TFM",
                "CONFIG_MBEDTLS_PSA_CRYPTO_C",
                "CONFIG_NORDIC_SECURITY_BACKEND",
                "__ZEPHYR__",
                "_FORTIFY_SOURCE=2"
            ],
            "compilerPath": "C:/ncs/toolchain/*/bin/arm-zephyr-eabi-gcc.exe",
            "cStandard": "c99",
            "cppStandard": "c++17",
            "intelliSenseMode": "gcc-arm",
            "compilerArgs": [
                "-mcpu=cortex-m4",
                "-mthumb",
                "-mabi=aapcs",
                "-mfp16-format=ieee",
                "-mtp=soft",
                "-Wall",
                "-Wextra",
                "-Wno-unused-parameter",
                "-Wno-missing-field-initializers",
                "-fno-strict-aliasing",
                "-fno-common",
                "-fdiagnostics-color=always"
            ],
            "browse": {
                "path": [
                    "${workspaceFolder}",
                    "${env:ZEPHYR_BASE}",
                    "${env:NRF_BASE}",
                    "C:/ncs/v*/zephyr",
                    "C:/ncs/v*/nrf",
                    "C:/ncs/v*/modules"
                ],
                "limitSymbolsToIncludedHeaders": true
            }
        }
    ],
    "version": 4
}

Other Extensions

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions