/fix

Proposes a fix for problems in the selected code.

Where you type it

In the GitHub Copilot Chat box in your code editor.

Before you start: GitHub Copilot extension signed in, in VS Code, Visual Studio, JetBrains or Xcode. This is GitHub Copilot, not Microsoft Copilot.

Add

Select the code. Paste the error if there is one.

Example

/fix TypeError: cannot read 'name' of undefined

Works in

  • VS Code
  • Visual Studio
  • JetBrains
  • Xcode

The list changes by editor and over time. Type / in Copilot Chat to see what yours offers. A real command built into Copilot, checked against its own help pages in November 2026. Official help page