This guide explains how to set up and use VSCode's debugging capabilities with this project.
- 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
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.
- 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