Skip to content
| Marketplace
Sign in
Visual Studio Code>Visualization>Changed ReferencesNew to Visual Studio Code? Get it now.
Changed References

Changed References

Rafayet Habib

|
1 install
| (0) | Free
Marks unchanged lines that use a function, class, constant or schema that changed in your uncommitted work.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Changed References

See which unchanged lines are affected by your uncommitted changes.

When you review your changes, the diff colours only the lines whose own text changed. But a line can stay exactly the same and still behave differently, because a function, class, constant or schema it uses was changed somewhere else. The diff shows that line plain, and nothing hints that it is now affected.

Changed References marks those lines with a third colour on the current side of the diff view, next to the diff's own green and red. A file with no changes of its own has no diff, so its marked lines show in the normal editor.

# schemas.py — you changed this class
class OrderRequest(BaseModel):
    quantity: int
    coupon: str | None = None      # ← added (green in the diff)

# routes.py — this line didn't change, but it now gets the violet mark
def create_order(request: OrderRequest):

What you get

  • A coloured background on every unchanged line that uses something you changed.
  • Every level, as deep as it goes: if route() calls handler(), which uses the changed OrderRequest, then route()'s line is marked too. Lines one step away get the full colour and a filled dot. Lines further down the chain get a lighter colour and a hollow dot.
  • A hover on each marked line says what it uses, the whole chain (route → handler → OrderRequest) and which file changed, with links to that file's diff and to the definition used.
  • Scrollbar ticks and a margin dot, so you can find marked lines in long files.
  • A "Changed References" panel in the Source Control sidebar lists every marked line by file. Click a line to jump to it.
  • A status bar count, e.g. 12 + 30 (direct + further away). Click it to look everything up again.

How it works

  1. Git tells it which lines changed since your last commit (git diff HEAD, plus untracked files).
  2. The editor's own language support tells it which function, class, method or constant each changed line belongs to. Definitions you deleted are read from the last commit.
  3. "Find All References" finds every line that uses them. Each of those lines sits in a definition of its own, whose users are looked up in turn, until nothing new turns up.
  4. Lines that changed themselves keep their usual green. The rest are marked.

It updates when you save a file or the Git state changes, and reuses earlier results for anything your edit can't have affected. The results are also saved between sessions, so reopening the window takes seconds.

Everything runs on your machine. No AI, no network calls and no telemetry.

Requirements

  • VS Code 1.85 or newer, or an editor built on it (Cursor, VSCodium, Windsurf, ...).
  • A Git repository with uncommitted changes.
  • Language support that answers "Go to Symbol" and "Find All References" for your language: Pylance or Pyright for Python, the built-in support for TypeScript and JavaScript, and so on. Python is what it has been tested with most.

Settings

Setting Default What it does
changedReferences.enabled true Turn the marks on or off.
changedReferences.color violet Violet, Cyan, Pink, Teal, Amber, or custom.
changedReferences.customColor #A78BFA The hex colour used when Color is custom.
changedReferences.backgroundOpacity 0.3 Background strength from 0 to 1. Lines further down a chain get two thirds of it.

Commands

  • Changed References: Choose Colour: pick a preset or type your own hex colour.
  • Changed References: Refresh (look everything up again): forget saved results and start over.
  • Changed References: Turn Marks On or Off

Good to know

  • The first run on a large set of changes can take a minute or two, because every definition is looked up through the language support. Marks appear while it runs. Later runs take seconds.
  • Marks come from saved files, so unsaved edits count once you save.
  • Code that reaches a name indirectly (getattr, a name built from a string, a dict of functions) can't be found by "Find All References", so those lines aren't marked.
  • A class that changed only in some of its fields has its direct users marked, but only users of the changed fields are followed deeper. Otherwise one changed settings class would mark half the project.
  • Users of a deleted top-level definition are found by searching for its name, and the editor checks each match. The hover says "matched by name" for these.
  • The left (old) side of a diff is not marked.
  • A file that has changes of its own shows its marks only in its diff. Opened as a normal tab (from the Explorer, say), it stays plain.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft