Skip to content

Commit aef4391

Browse files
committed
Launch.json improvements to remove dep and add compound, plus docs
1 parent 023dc1b commit aef4391

File tree

2 files changed

+29
-9
lines changed

2 files changed

+29
-9
lines changed

.vscode/launch.json

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"version": "0.2.0",
66
"configurations": [
77
{
8-
"name": "Python: Quart",
8+
"name": "Backend (Python)",
99
"type": "debugpy",
1010
"request": "launch",
1111
"module": "quart",
@@ -22,18 +22,17 @@
2222
"-p 50505"
2323
],
2424
"console": "integratedTerminal",
25-
"justMyCode": false,
26-
"envFile": "${input:dotEnvFilePath}",
25+
"justMyCode": false
2726
},
2827
{
29-
"name": "Frontend: watch",
28+
"name": "Frontend",
3029
"type": "node-terminal",
3130
"request": "launch",
3231
"command": "npm run dev",
3332
"cwd": "${workspaceFolder}/app/frontend",
3433
},
3534
{
36-
"name": "Python: Debug Tests",
35+
"name": "Tests (Python)",
3736
"type": "debugpy",
3837
"request": "launch",
3938
"program": "${file}",
@@ -42,11 +41,11 @@
4241
"justMyCode": false
4342
}
4443
],
45-
"inputs": [
44+
"compounds": [
4645
{
47-
"id": "dotEnvFilePath",
48-
"type": "command",
49-
"command": "azure-dev.commands.getDotEnvFilePath"
46+
"name": "Frontend & Backend",
47+
"configurations": ["Backend (Python)", "Frontend"],
48+
"stopAll": true
5049
}
5150
]
5251
}

docs/localdev.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# Local development of Chat App
22

3+
After deploying the app to Azure, you may want to continue development locally. This guide explains how to run the app locally, including hot reloading and debugging.
4+
5+
* [Running development server from the command line](#running-development-server-from-the-command-line)
6+
* [Hot reloading frontend and backend files](#hot-reloading-frontend-and-backend-files)
7+
* [Using VS Code "Run and Debug"](#using-vs-code-run-and-debug)
8+
* [Using a local OpenAI-compatible API](#using-a-local-openai-compatible-api)
9+
* [Using Ollama server](#using-ollama-server)
10+
* [Using llamafile server](#using-llamafile-server)
11+
12+
## Running development server from the command line
13+
314
You can only run locally **after** having successfully run the `azd up` command. If you haven't yet, follow the steps in [Azure deployment](../README.md#azure-deployment) above.
415

516
1. Run `azd auth login`
@@ -40,6 +51,16 @@ Navigate to the URL shown in the terminal (in this case, `http://localhost:5173/
4051

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

54+
## Using VS Code "Run and Debug"
55+
56+
This project includes configurations defined in `.vscode/launch.json` that allow you to run and debug the app directly from VS Code:
57+
58+
* "Backend (Python)": Starts the Python backend server, defaulting to port 50505.
59+
* "Frontend": Starts the frontend server using Vite, typically at port 5173.
60+
* "Frontend & Backend": A compound configuration that starts both the frontend and backend servers.
61+
62+
When you run these configurations, you can set breakpoints in your code and debug as you would in a normal VS Code debugging session.
63+
4364
## Using a local OpenAI-compatible API
4465

4566
You may want to save costs by developing against a local LLM server, such as

0 commit comments

Comments
 (0)