Developer Use Cases — IDE, CLI, Chat
This domain tests your ability to apply GitHub Copilot across practical software development workflows: writing code, generating tests and documentation, debugging, refactoring, and using Copilot in both IDE and CLI contexts. It also tests your knowledge of how to optimize Copilot's context and where its limitations require human review. This domain carries 35% of the exam weight, making it the highest-weighted single domain. Expect scenario-based questions that ask you to identify the correct tool, command, variable, or workflow for a described situation.
Code Completion
How Copilot Generates Suggestions
GitHub Copilot provides inline code completions as you type, drawing on the context of your open file, neighboring open tabs, and your current cursor position. Suggestions appear as ghost text — gray, dimmed text rendered after your cursor.
Accepting suggestions:
| Action | Shortcut (VS Code default) | What it does |
|---|---|---|
| Accept full suggestion | Tab | Inserts the entire ghost-text suggestion |
| Accept next word only | Ctrl+Right (Windows/Linux) / Cmd+Right (macOS) | Accepts one word at a time from the suggestion |
| Dismiss suggestion | Escape | Clears the ghost text without inserting anything |
| Cycle to next suggestion | Alt+] | Shows the next alternative suggestion |
| Cycle to previous suggestion | Alt+[ | Shows the previous alternative suggestion |
| Open Copilot completions panel | Ctrl+Enter | Opens a panel with up to 10 alternative completions |
Common traps:
- The exam may list Enter as a distractor for accepting suggestions — Enter inserts a newline, not the suggestion.
- Ctrl+Right accepts only the next word, not the full line — distinguish this from Tab clearly.
- The completions panel (Ctrl+Enter) shows up to 10 suggestions, not unlimited.
- Copilot does not require a specific comment structure to trigger suggestions; it reads your code context automatically, but comments do act as strong prompts.
Worked Scenario
Requirement: A developer sees a Copilot suggestion for a 12-line function but only wants to accept the function name and opening parenthesis.
Reasoning: Use Ctrl+Right repeatedly to accept one word at a time instead of pressing Tab, which would accept the entire suggestion.
Inline Chat: Slash Commands
Inline chat is opened in the editor with Ctrl+I (Windows/Linux) or Cmd+I (macOS). It lets you interact with Copilot in context — against selected code or at the cursor position — without leaving the editor.
Slash Commands Reference
| Command | Purpose | Typical input |
|---|---|---|
| /fix | Fix a bug, error, or highlighted problem in selected code | Select broken code, type /fix |
| /explain | Explain what selected code does in plain language | Select any code block |
| /tests | Generate unit tests for the selected function or class | Select a function definition |
| /doc | Generate documentation (docstring, JSDoc, etc.) for selected code | Select a function or class |
Key behaviors:
- Slash commands work in inline chat (Ctrl+I) and also in the Chat panel (sidebar).
/fixoperates on the highlighted selection — you must select the problematic code first./explaincan be used without selection; Copilot then explains the code around the cursor./testsrespects the test framework already present in your project (detected from config files likejest.config.js,pytest.ini)./docgenerates framework-appropriate documentation: JSDoc for JavaScript/TypeScript, docstrings for Python, XML comments for C#.
Common traps:
/fixdoes not automatically run or validate the fix — you must review and apply it./testsis the slash command for test generation; do not confuse with a hypothetical/test(singular) — the exam uses/tests./docgenerates documentation for the selected code, not for the whole file unless the whole file is selected.- Using
/explainon a stack trace in the terminal is a valid pattern but uses a different entry point (see Chat Variables below).
Unlock with a paid plan
12 more sections (about 2,916 words) continue below. Every paid plan unlocks all GH-300 study guides, the full question bank and mock exams, from $4.97/month.