Skip to content

f12 "go to definition" does not work in CPP files with CPP and React/js extentions installed. #2623

@timbo100

Description

@timbo100

Describe the bug
The problem appears to be in one project where I have mixed javascript/react extensions plus CPP extensions installed.

Other CPP project that don't have javascript/react extentions installed have no issues with goto definition action in CPP code.

In the problematic project which has javascript/react code files, I am able to use goto definition between javascript files. However, when I'm in a CPP file goto definition action results in "no definition found..." alert.

Please confirm that this problem is VSCodium-specific
I have opened same projects with vscode and made sure I have same named extensions also installed. The vscode app has no issue with goto definition from either CPP or javascript files. Each takes me to file I have focus on. For example I'm choosing the imported files (Js) or included file (cpp) to test.

Please confirm that the issue/resolution isn't already documented
I've searched issues with no results that involved to types of source files.

To Reproduce
Steps to reproduce the behavior:

  1. create a new project (~/myprojects/proj1) with CPP files that are in compilation closure of main.cpp, e.g.
  2. from ~/myprojects/ use npm create vite@latest proj1 -- --template react to merge a beginner react project with js code into existing proj1 project
  3. add extensions: Prettier - Code formatter; ES7+ React/Redux/React-Native snippets to proj1, as well as typical CPP useful extensions.

Expected behavior
vscode editing of proj1 gives me expected behavior:

  1. when I choose inclusion file at the top of main.cpp and select F12 the included files opens in a new tab
  2. when I choose import, e.g. of App.jsx in main.jsx and select F12 file App.jsx open in a new tab

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Ubuntu 24.04

  • Architecture x86_64

  • Version (vscodium):
    Version: 1.105.17075
    Commit: 14bd1561ce547502e6ff1968090dc18c49160aab
    Date: 2025-10-21T20:24:03.344Z
    Electron: 37.6.0
    ElectronBuildId: undefined
    Chromium: 138.0.7204.251
    Node.js: 22.19.0
    V8: 13.8.258.32-electron.0
    OS: Linux x64 6.8.0-88-generic

  • Version (vscode):
    Version: 1.104.3
    Commit: 385651c938df8a906869babee516bffd0ddb9829
    Date: 2025-10-02T12:30:51.747Z
    Electron: 37.3.1
    ElectronBuildId: 12404162
    Chromium: 138.0.7204.235
    Node.js: 22.18.0
    V8: 13.8.258.31-electron.0
    OS: Linux x64 6.8.0-88-generic

Additional context
I tried disabling the js/react related extensions in the problematic vscodium session and then restarted vscodium but it didn't make a difference. goto definition for jsx file worked but CPP didn't.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions