-
Notifications
You must be signed in to change notification settings - Fork 5k
Adding custom debug chat mode for GitHub Copilot Agent mode development #2672
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,36 @@ | ||||||
--- | ||||||
description: 'Debug application to find and fix a bug' | ||||||
model: GPT-5 (Preview) | ||||||
tools: ['extensions', 'codebase', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'terminalSelection', 'terminalLastCommand', 'fetch', 'findTestFiles', 'searchResults', 'githubRepo', 'todos', 'runTests', 'runCommands', 'runTasks', 'editFiles', 'runNotebooks', 'search', 'new', 'Microsoft Docs', 'get_issue', 'get_issue_comments', 'get-library-docs', 'playwright', 'pylance mcp server'] | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] The tools array contains inconsistent naming patterns. Some tools use camelCase ('vscodeAPI', 'testFailure'), some use snake_case ('get_issue', 'get_issue_comments'), and some use kebab-case ('get-library-docs'). Consider standardizing the naming convention for better maintainability.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
--- | ||||||
|
||||||
# Debug Mode Instructions | ||||||
|
||||||
You are in debug mode. Your primary objective is to systematically identify, analyze, and resolve bugs in the developer's application. Follow this structured debugging process: | ||||||
|
||||||
## Debugging process | ||||||
|
||||||
• **Gather context**: Read error messages/stack traces, examine recent changes, identify expected vs actual behavior. If the issue is a GitHub issue link, use 'get_issue' and 'get_issue_comments' tools to fetch the issue and comments. | ||||||
• **Root cause analysis**: Trace execution path, check for common issues, use search tools to understand component interactions | ||||||
• **Targeted fix**: Make minimal changes addressing root cause, follow existing patterns, consider edge cases | ||||||
• **Verify thoroughly**: Run tests to confirm fix, check for regressions, test edge cases | ||||||
• **Document**: Summarize what was fixed, explain root cause, suggest preventive measures. Do not document this in the repo itself, only in the chat history and commit messages. | ||||||
|
||||||
## Local server setup | ||||||
|
||||||
You MUST check task output readiness before debugging, testing, or declaring work complete. | ||||||
|
||||||
- Start the app: Run the "Development" compound task (which runs both frontend and backend tasks) | ||||||
- Check readiness from task output (both must be ready): | ||||||
- Frontend (task: "Frontend: npm run dev"): look for the Vite URL line. Either of these indicates ready: | ||||||
- "Local: http://127.0.0.1:..." or "➜ Local: http://127.0.0.1:..." | ||||||
- Backend (task: "Backend: quart run"): wait for Hypercorn to bind. Ready when you see: | ||||||
- "INFO:hypercorn.error:Running on http://127.0.0.1:50505" (port may vary if changed) | ||||||
- If either readiness line does not appear, the server is not ready. Investigate and fix errors shown in the corresponding task terminal before proceeding. | ||||||
- Hot reload behavior: | ||||||
- Frontend: Vite provides HMR; changes in the frontend are picked up automatically without restarting the task. | ||||||
- Backend: Quart is started with --reload; Python changes trigger an automatic restart. | ||||||
- If watchers seem stuck or output stops updating, stop the tasks and run the "Development" task again. | ||||||
- To interact with the application, use the Playwright MCP server | ||||||
- To run the Python backend pytest tests, use the "run tests" tool | ||||||
- To run the Playwright E2E tests of the whole app (with a mocked backend), run `pytest tests/e2e.py --tracing=retain-on-failure`. |
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -15,6 +15,74 @@ | |||||
"cwd": "${workspaceFolder}/app" | ||||||
}, | ||||||
"problemMatcher": [] | ||||||
}, | ||||||
{ | ||||||
"label": "Development", | ||||||
"dependsOn": [ | ||||||
"Frontend: npm run dev", | ||||||
"Backend: quart run" | ||||||
], | ||||||
"group": { | ||||||
"kind": "build", | ||||||
"isDefault": true | ||||||
} | ||||||
}, | ||||||
{ | ||||||
"label": "Frontend: npm run dev", | ||||||
"type": "npm", | ||||||
"script": "dev", | ||||||
"isBackground": true, | ||||||
"options": { | ||||||
"cwd": "${workspaceFolder}/app/frontend" | ||||||
}, | ||||||
"presentation": { | ||||||
"reveal": "always", | ||||||
"group": "buildWatchers", | ||||||
"panel": "dedicated", | ||||||
"clear": false | ||||||
}, | ||||||
"problemMatcher": { | ||||||
"pattern": { | ||||||
"regexp": "" | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Empty regex pattern in problemMatcher could be confusing. Consider adding a comment explaining why the pattern is empty or use a more explicit placeholder like ".*" to indicate it matches anything.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
}, | ||||||
pamelafox marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
"background": { | ||||||
"activeOnStart": true, | ||||||
"beginsPattern": ".*VITE v.*", | ||||||
"endsPattern": ".*(?:➜\\s*)?Local:\\s+https?://.*" | ||||||
} | ||||||
} | ||||||
}, | ||||||
{ | ||||||
"label": "Backend: quart run", | ||||||
"type": "shell", | ||||||
"command": "${workspaceFolder}/.venv/bin/python", | ||||||
pamelafox marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
"windows": { | ||||||
"command": "${workspaceFolder}\\.venv\\Scripts\\python.exe" | ||||||
}, | ||||||
"args": ["-m", "quart", "run", "--reload", "-p", "50505"], | ||||||
"options": { | ||||||
"cwd": "${workspaceFolder}/app/backend", | ||||||
"env": { | ||||||
"QUART_APP": "main:app", | ||||||
"QUART_ENV": "development", | ||||||
"QUART_DEBUG": "0", | ||||||
"LOADING_MODE_FOR_AZD_ENV_VARS": "override" | ||||||
} | ||||||
}, | ||||||
"isBackground": true, | ||||||
"presentation": { | ||||||
"reveal": "always", | ||||||
"group": "buildWatchers", | ||||||
"panel": "dedicated" | ||||||
}, | ||||||
"problemMatcher": { | ||||||
"pattern": { "regexp": "" }, | ||||||
pamelafox marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [nitpick] Empty regex pattern in problemMatcher could be confusing. Consider adding a comment explaining why the pattern is empty or use a more explicit placeholder like ".*" to indicate it matches anything.
Suggested change
Copilot uses AI. Check for mistakes. Positive FeedbackNegative Feedback |
||||||
"background": { | ||||||
"activeOnStart": true, | ||||||
"beginsPattern": ".*Serving Quart app.*", | ||||||
"endsPattern": ".*hypercorn.*Running on http://.*" | ||||||
} | ||||||
} | ||||||
} | ||||||
] | ||||||
} |
Uh oh!
There was an error while loading. Please reload this page.