Skip to content

Commit b538376

Browse files
committed
Fix tasks to work with chat mode
1 parent ccfa4f8 commit b538376

File tree

2 files changed

+84
-10
lines changed

2 files changed

+84
-10
lines changed
Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
description: 'Debug application to find and fix a bug'
3-
model: Claude Sonnet 4
4-
tools: ['codebase', 'usages', 'vscodeAPI', 'problems', 'changes', 'testFailure', 'terminalSelection', 'terminalLastCommand', 'fetch', 'findTestFiles', 'searchResults', 'githubRepo', 'extensions', 'runTests', 'editFiles', 'runNotebooks', 'search', 'new', 'runCommands', 'get_issue', 'get_issue_comments', 'pylance mcp server', 'get-library-docs', 'Microsoft Docs', 'playwright']
3+
model: GPT-5 (Preview)
4+
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']
55
---
66

77
# Debug Mode Instructions
@@ -10,18 +10,27 @@ You are in debug mode. Your primary objective is to systematically identify, ana
1010

1111
## Debugging process
1212

13-
**Reproduce first**: Try to reproduce the bug before making changes - run the app with start script, test app with Playwright MCP, capture exact error messages and steps
14-
**Gather context**: Read error messages/stack traces, examine recent changes, identify expected vs actual behavior
15-
**Root cause analysis**: Trace execution path, check for common issues (null refs, race conditions), use search tools to understand component interactions
13+
**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.
14+
**Root cause analysis**: Trace execution path, check for common issues, use search tools to understand component interactions
1615
**Targeted fix**: Make minimal changes addressing root cause, follow existing patterns, consider edge cases
1716
**Verify thoroughly**: Run tests to confirm fix, check for regressions, test edge cases
18-
**Document**: Summarize what was fixed, explain root cause, suggest preventive measures
17+
**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.
1918

20-
## Local server setup:
19+
## Local server setup
2120

22-
- To run the application, run the "Start app" task
21+
You MUST check task output readiness before debugging, testing, or declaring work complete.
22+
23+
- Start the app: Run the "Development" compound task (which runs both frontend and backend tasks)
24+
- Check readiness from task output (both must be ready):
25+
- Frontend (task: "Frontend: npm run dev"): look for the Vite URL line. Either of these indicates ready:
26+
- "Local: http://127.0.0.1:..." or "➜ Local: http://127.0.0.1:..."
27+
- Backend (task: "Backend: quart run"): wait for Hypercorn to bind. Ready when you see:
28+
- "INFO:hypercorn.error:Running on http://127.0.0.1:50505" (port may vary if changed)
29+
- If either readiness line does not appear, the server is not ready. Investigate and fix errors shown in the corresponding task terminal before proceeding.
30+
- Hot reload behavior:
31+
- Frontend: Vite provides HMR; changes in the frontend are picked up automatically without restarting the task.
32+
- Backend: Quart is started with --reload; Python changes trigger an automatic restart.
33+
- If watchers seem stuck or output stops updating, stop the tasks and run the "Development" task again.
2334
- To interact with the application, use the Playwright MCP server
24-
- If you change the JS, rebuild and restart the server by ending the task and running the "Start app" task again.
25-
- Everytime you change the JS, you MUST restart the app (which will rebuild the JS). Otherwise, the changes will not appear.
2635
- To run the Python backend pytest tests, use the "run tests" tool
2736
- To run the Playwright E2E tests of the whole app (with a mocked backend), run `pytest tests/e2e.py --tracing=retain-on-failure`.

.vscode/tasks.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,71 @@
1515
"cwd": "${workspaceFolder}/app"
1616
},
1717
"problemMatcher": []
18+
},
19+
{
20+
"label": "Development",
21+
"dependsOn": [
22+
"Frontend: npm run dev",
23+
"Backend: quart run"
24+
],
25+
"group": {
26+
"kind": "build",
27+
"isDefault": true
28+
}
29+
},
30+
{
31+
"label": "Frontend: npm run dev",
32+
"type": "npm",
33+
"script": "dev",
34+
"isBackground": true,
35+
"options": {
36+
"cwd": "${workspaceFolder}/app/frontend"
37+
},
38+
"presentation": {
39+
"reveal": "always",
40+
"group": "buildWatchers",
41+
"panel": "dedicated",
42+
"clear": false
43+
},
44+
"problemMatcher": {
45+
"pattern": {
46+
"regexp": ""
47+
},
48+
"background": {
49+
"activeOnStart": true,
50+
"beginsPattern": ".*VITE v.*",
51+
"endsPattern": ".*(?:➜\\s*)?Local:\\s+https?://.*"
52+
}
53+
}
54+
},
55+
{
56+
"label": "Backend: quart run",
57+
"type": "shell",
58+
"command": "${workspaceFolder}/.venv/bin/python",
59+
"args": ["-m", "quart", "run", "--reload", "-p", "50505"],
60+
"options": {
61+
"cwd": "${workspaceFolder}/app/backend",
62+
"env": {
63+
"QUART_APP": "main:app",
64+
"QUART_ENV": "development",
65+
"QUART_DEBUG": "0",
66+
"LOADING_MODE_FOR_AZD_ENV_VARS": "override"
67+
}
68+
},
69+
"isBackground": true,
70+
"presentation": {
71+
"reveal": "always",
72+
"group": "buildWatchers",
73+
"panel": "dedicated"
74+
},
75+
"problemMatcher": {
76+
"pattern": { "regexp": "" },
77+
"background": {
78+
"activeOnStart": true,
79+
"beginsPattern": ".*Serving Quart app.*",
80+
"endsPattern": ".*hypercorn.*Running on http://.*"
81+
}
82+
}
1883
}
1984
]
2085
}

0 commit comments

Comments
 (0)