mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-03-17 21:32:36 +01:00
* added missing dependency, missing api key placeholder, updated docs * Apply black formatting and validate bot token functionality * acknowledging black formatting * added the validation to update tokens as well * Made the token validation errors looks nicer * getting rif of duplicate dependency
1.3 KiB
1.3 KiB
VSCode Debugging Setup
This guide explains how to set up and use VSCode's debugging capabilities with this project.
Initial Setup
- Environment Setup:
- Copy
.vscode/.env.template
to.vscode/.env
- Fill in the necessary environment variables in
.vscode/.env
- Copy
- launch.json:
- Copy
.vscode/launch.template.jsonc
to.vscode/launch.json
- Copy
Using the Debugger
Before starting, make sure the Docker Daemon is running.
- Open the Debug view in VSCode (Cmd+Shift+D on macOS)
- From the dropdown at the top, select "Clear and Restart External Volumes and Containers" and press the green play button
- From the dropdown at the top, select "Run All Onyx Services" and press the green play button
- CD into web, run "npm i" followed by npm run dev.
- Now, you can navigate to onyx in your browser (default is http://localhost:3000) and start using the app
- You can set breakpoints by clicking to the left of line numbers to help debug while the app is running
- Use the debug toolbar to step through code, inspect variables, etc.
Features
- Hot reload is enabled for the web server and API servers
- Python debugging is configured with debugpy
- Environment variables are loaded from
.vscode/.env
- Console output is organized in the integrated terminal with labeled tabs