VSCode Ctrl + Click

VSCode Ctrl + Click

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

The Ctrl+Click Mystery in VSCode PHP Development

In Visual Studio Code, holding <kbd>Ctrl</kbd> and clicking a variable or function name is the standard workflow for jumping to its definition. This feature relies on the Language Server Protocol (LSP) and a specific extension that connects your editor to the running language server. When this stops working, it usually points to a mismatch between the installed PHP version and the extensions you are using, rather than a core bug in the editor itself.

The scenario described involves PHP 5.6 running on Ubuntu with VSCode version 1.19.2. While older versions of the IDE often struggled with legacy environments, the failure mode here is almost certainly related to how the Go-to-Definition command interacts with the installed extensions. The configuration setting "editor.multiCursorModifier": "alt" controls what key combination initiates multi-cursor editing (e.g., making it so `Shift + Click adds a new cursor instead of selecting text). It has absolutely no impact on navigation features like jumping to definitions, which is why changing that setting yields no results.

The primary culprit in environments running PHP 5.6 is the specific PHP Language Service extension. Modern versions of the official PHP Intelephense or standard PHP extensions are built against newer language specifications and often refuse to initialize correctly with EOL (End of Life) versions like 5.6 because they cannot parse the syntax tree reliably. If the language server fails to start or crashes silently upon opening a file, VSCode falls back to its basic text editing mode, disabling all IntelliSense features including navigation.

To resolve this without upgrading your entire stack immediately, you must verify which extension is actually handling the PHP context. Open your settings.json and inspect for entries related to php.intelephense.enable or similar legacy settings. If you are using a bundled "PHP" extension from the marketplace that was released after 2016, it likely requires PHP 7.0+ or later.

A practical fix involves installing a version of the language server that explicitly supports older parsers, or temporarily switching to a different implementation like php-language-server if available for your specific setup. You can also try disabling all extensions and re-enabling them one by one to isolate the conflict. Another common pitfall is having multiple PHP installations on Ubuntu; ensure that the executable path pointed to in your .vscode/settings.json matches the binary of version 5.6 exactly, or update the setting to point to a compatible PHP 7+ runtime if upgrading the runtime is feasible.

If you are maintaining a legacy codebase that strictly requires PHP 5.6, consider using a specialized language server like php-parser which can handle older versions more gracefully than the modern intelephense. You might need to configure the workspace settings to point specifically to this parser:

{
    "php.languageServer": "php-parser",
    "php.parse.defaultVersion": "5.6"
}

While upgrading your PHP environment is the most robust long-term solution—since PHP 5.6 reached end-of-life in December 2018 and lacks critical security patches—working around the navigation issue allows you to inspect the codebase while planning a migration path. For modern projects, ensuring your VSCode version is updated alongside the PHP runtime eliminates these compatibility headaches entirely. If you are working with Laravel applications specifically, note that older Laravel versions (5.x) were compatible with PHP 5.6, but the tooling ecosystem has shifted significantly since then.

For more detailed guidance on managing legacy PHP setups in modern editors, refer to the resources available at https://laravelcompany.com.

Our network