microsoft / microsoft/vscode-cpptools

Go to Definition goes to the wrong header (not used by IntelliSense) when `<string>` actually references a workspace file

Open
#12,548 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Use #include <string> in a case where the includePath includes the path to a local "string" file.

Bug: IntelliSense will correctly use the local version of the file, but confusingly, go to definition on the #include header will go to the system header still.

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

Reproduce the case with #include , a local workspace string file, and includePath pointing to it. Compare the header selected by IntelliSense with the target selected by Go to Definition, then inspect the extension's include-resolution and navigation paths. Done means Go to Definition opens the workspace header that IntelliSense uses.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.