Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>CodeWhereNew to Visual Studio Code? Get it now.
CodeWhere

CodeWhere

he-zhe

| (0) | Free
Copy a compact reference to the current file, symbol, and line range for AI assistants, code review, and team communication.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

CodeWhere

Copy a compact reference to the code you are looking at in Visual Studio Code.

CodeWhere captures the current file path, enclosing symbol, selected or current line range, and a short anchor line, then copies that context to your clipboard in a format that is easy to paste into AI assistants, code reviews, bug reports, and team chat.

Example Output

path: src/services/auth.ts
symbol: AuthService.login
lines: 42-57
anchor: const token = await this.exchangeCode(code);

How To Use

  1. Open a file in the editor.
  2. Place your cursor on a line, or select a range of lines.
  3. Run Copy CodeWhere Context from the editor context menu or Command Palette.

Default shortcut:

  • Linux and Windows: Alt+Shift+C
  • macOS: Ctrl+Shift+C

What CodeWhere Captures

  • Workspace-relative file path when available
  • Enclosing symbol path when VS Code can resolve document symbols
  • Current line number or selected line range
  • A short anchor line when it helps disambiguate the location

Why It Is Useful

  • Give AI coding assistants precise context without pasting large code blocks
  • Share exact locations in code review comments, issues, and chat
  • Keep references compact, readable, and easy to paste
  • Stay local: the extension only copies text to your clipboard

Notes

  • The symbol field is included only when VS Code can resolve document symbols for the current file.
  • For multi-line selections with a resolved symbol, the anchor field is usually omitted to keep the output concise.
  • Paths are workspace-relative when possible and fall back to the file path when needed.
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft