microsoft / microsoft/vscode-cpptools

“(declaration)” appears when searching same symbol “fun” in workspace (using “#”), while not appear when searching in a file (using “@”)

Open
#12,444 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Document Symbol Language Service
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Environment

VSCode 1.90.2+ C/C++ Extension 1.21.0 pre-release)

Bug Summary and Steps to Reproduce

Bug Summary:

More info:

  • Repro platform: Windows, Linux, Mac
  • Repro languages: ENU and loc languages

Steps to reproduce:

  1. Download the repository https://devdiv.visualstudio.com/DevDiv/_git/Vcls-vscode-test
  2. Open folder “MultiRootProjects” with VSCode
  3. Open file “project_A\project_subfolder_H\ references.cpp”
  4. Pressing F1 or Ctrl+ Shift+ P to show the command palette.
  5. Search for symbol “fun” in workspace by typing in the command palette "#fun"
  6. Search for symbol “fun” in the file “references.cpp” by typing in the command palette "@fun"

Expected result:
Display same results as will navigate to the same code line

Actual result:
With “(declaration)” appeared when searching with “#fun”, while without “(declaration)” appeared when searching with “@fun”

#fun: with “(declaration)”
image

@fun: without “(declaration)”
image

Configuration and Logs
not related
Other Extensions

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the difference between #fun and @fun in the MultiRootProjects workspace, using project_A\project_subfolder_H\ references.cpp and the linked test repository. Compare the workspace and file symbol-search paths and their displayed results; done means both searches show consistent entries while navigating to the same code line.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, typescript, vscode
Domain
developer-experience, search, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.