Skip to content

Commit 543730b

Browse files
committed
Update docs about local dev
1 parent 6baf43b commit 543730b

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

docs/localdev.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ After deploying the app to Azure, you may want to continue development locally.
44

55
* [Running development server from the command line](#running-development-server-from-the-command-line)
66
* [Hot reloading frontend and backend files](#hot-reloading-frontend-and-backend-files)
7+
* [Using VS Code "Development" task](#using-vs-code-development-task)
8+
* [Using Copilot Chat Debug Mode](#using-copilot-chat-debug-mode)
79
* [Using VS Code "Run and Debug"](#using-vs-code-run-and-debug)
810
* [Using a local OpenAI-compatible API](#using-a-local-openai-compatible-api)
911
* [Using Ollama server](#using-ollama-server)
@@ -64,6 +66,56 @@ Navigate to the URL shown in the terminal (in this case, `http://localhost:5173/
6466

6567
Then, whenever you make changes to frontend files, the changes will be automatically reloaded, without any browser refresh needed.
6668

69+
Alternatively, you can start both servers with hot reloading by using the VS Code "Development" task. See [Using VS Code "Development" task](#using-vs-code-development-task).
70+
71+
## Using VS Code "Development" task
72+
73+
If you prefer VS Code tasks for hot reloading both servers at once, use the "Development" task defined in `.vscode/tasks.json`.
74+
75+
How to run it:
76+
77+
* Run Build Task (Shift+Cmd+B) to start the default build task, which is "Development".
78+
* Or open the Command Palette (Shift+Cmd+P) and run: "Tasks: Run Task" -> "Development".
79+
80+
What it does:
81+
82+
* Starts two background tasks in dedicated panels:
83+
* "Frontend: npm run dev" from `app/frontend` (Vite HMR for instant frontend updates)
84+
* "Backend: quart run" from `app/backend` (Quart with `--reload` for backend auto-restarts)
85+
86+
Readiness indicators:
87+
88+
* Frontend is ready when Vite prints a Local URL, for example: `Local: http://localhost:5173/`.
89+
* Backend is ready when Hypercorn reports: `Running on http://127.0.0.1:50505` (port may vary).
90+
91+
Tips:
92+
93+
* To stop both, run: "Tasks: Terminate Task" and pick the running tasks.
94+
* If watchers stall, terminate and run "Development" again.
95+
* Frontend changes apply via HMR; backend Python changes auto-reload. No manual restart needed.
96+
97+
## Using Copilot Chat Debug Mode
98+
99+
You can use GitHub Copilot Chat with a custom "debug" mode to streamline troubleshooting in this repo.
100+
101+
Prerequisites:
102+
103+
* VS Code 1.101+ (custom chat modes are in preview)
104+
* Access to GitHub Copilot and Copilot Chat
105+
* Playwright MCP server and GitHub MCP server (optional)
106+
107+
To learn more about the chat modes feature, read [VS Code docs for Chat modes](https://code.visualstudio.com/docs/copilot/chat/chat-modes).
108+
109+
To use the debug mode:
110+
111+
* Open the Chat view.
112+
* Use the chat mode dropdown at the top of the Chat view to select the "debug" mode.
113+
* Start chatting in that mode; the instructions and tools from the repo file will be applied automatically.
114+
* The mode will use the tasks from .vscode/tasks.json to run the frontend and backend server, and should be able to read any errors in the output.
115+
* The mode may also use tools from the Playwright MCP server and GitHub MCP server, if those servers are installed in your VS Code.
116+
117+
Notably, this mode will not actually use a breakpoint-based debugger. Read on to learn how to use breakpoints while debugging the Python code.
118+
67119
## Using VS Code "Run and Debug"
68120

69121
This project includes configurations defined in `.vscode/launch.json` that allow you to run and debug the app directly from VS Code:

0 commit comments

Comments
 (0)