Setting up GitHub Copilot for your development workflow
- 2/25/2026
- Practice files
- Set up your GitHub account and select a Copilot plan
- Install Copilot in your development environment
- Configure permissions and personal settings
- Test Copilot with sample prompts across languages
- Troubleshoot installation issues and common errors
- Apply best practices for using Copilot effectively
- Explore Copilot's functionality in online and offline modes
- Skills review
- Practice tasks
Test Copilot with sample prompts across languages
This section guides you through the process of verifying GitHub Copilot’s installation by writing your first prompt and observing suggestions in multiple programming languages. It also covers how to use keyboard shortcuts to control suggestions.
Step 1: Creating a file for each language
To enable Copilot to understand the language context, you must first create a file with the correct extension in Visual Studio Code.
Folder structure in Visual Studio Code, displaying HTML, SQL, JavaScript, and Python files under the Testing Code directory
To verify Copilot functionality across programming languages, you can start by creating test files. The following table shows the file extension and steps to create them in Visual Studio Code.
Language |
File extension |
Steps to create a file |
|---|---|---|
Python |
.py |
File > New File > Save As > test.py |
JavaScript |
.js |
File > New File > Save As > script.js |
SQL |
.sql |
File > New File > Save As > query.sql |
HTML |
.html |
File > New File > Save As > index.html |
Step 2: Writing a sample function with a comment
Once your file is created and open, you can write a natural language comment that describes the functionality you want. Copilot will respond with code suggestions in real time. Let’s start with the Python file test.py.
Example:
Copilot suggestion:
def factorial(n):
if n < 0:
return "Invalid input"
elif n == 0 or n == 1:
return 1
else:
result = 1
for i in range(2, n + 1):
result *= i
return result
Step 3: Testing suggestions in multiple languages
You can try the same idea with other files to verify that Copilot works across languages.
JavaScript (script.js)
Prompt:
Suggested output:
SQL (query.sql)
Prompt:
Expected output:
HTML (index.html)
Prompt:
Suggested output:




