# Go to Definition

> An editor command. It jumps from a name to the place where it is made.

**Field:** Software Development  
**Category:** Code Intelligence  
**Also known as:** Jump to Definition, Go to Declaration, F12 (Go to Definition)

## Think of it like

It is like tapping a word in a book. You land on the page that says what it means.

## Definition

Go to definition is an editor command that jumps from a name to where it is made. You click on a function call, and the editor opens the file and line where that function is written. It works for classes, variables and types too. The editor gets the answer from a language server or a code index. It is the most used way to find your way in code you did not write.

## Example

In Visual Studio Code, Jack puts his cursor on sendInvoice and presses F12. The editor opens billing.ts at the line that defines it.

## Why it matters

It turns reading a new codebase from a hunt into a walk. One key press replaces a search.

## Common mistake

Landing on a type file, not the real code. In some languages the first hit is just a stub, so look for go to implementation too.

## Three principles

- **From use to source.** Jump to where it is made.
- **Needs an index.** A server or index gives the answer.
- **Works both ways.** Pair it with find all references.

## Related terms

- [Find All References](https://learn.benibix.com/term/development/find-all-references)
- [Language Server Protocol (LSP)](https://learn.benibix.com/term/development/language-server-protocol)
- [Symbol (Programming)](https://learn.benibix.com/term/development/code-symbol)
- [Visual Studio Code](https://learn.benibix.com/term/development/visual-studio-code)
- [Integrated Development Environment (IDE)](https://learn.benibix.com/term/development/ide)

![Three editors on the left, VS Code, Vim and another editor, all joined to one language server for Python on the right, lit up. Between them, a request labelled go to definition, file app.py, line 12, goes right, and an answer labelled utils.py, line 40, comes back. A note says one server serves every editor, so each language is built once.](https://learn.benibix.com/diagrams/dev4-lsp.svg)

---

Source: https://learn.benibix.com/term/development/go-to-definition
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-17
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
