mirror of
https://github.com/onyx-dot-app/onyx.git
synced 2026-10-22 19:32:55 -05:00
1.4 KiB
1.4 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.txtto.vscode/.env - Fill in the necessary environment variables in
.vscode/.env
- Copy
- launch.json:
- Copy
.vscode/launch.template.jsoncto.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
- 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.
Note: Clear and Restart External Volumes and Containers will reset your postgres and Vespa (relational-db and index). Only run this if you are okay with wiping your data.
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