Skip to main content
To develop and debug UltraRAG more efficiently, you can use the built-in debugging function of VSCode to run specific Pipeline configuration files and perform breakpoint debugging on the execution process.

Step 1: Compile and Configure Parameters

Taking examples/rag_full.yaml as an example, first execute Pipeline Compilation and complete parameter configuration. This process is consistent with Quick Start, the only difference is that there is no need to execute the run command here.

Step 2: Create Debug Configuration File

Create a .vscode/launch.json file in the project root directory and write the following content:
https://mintcdn.com/ultrarag/T7GffHzZitf6TThi/images/json.svg?fit=max&auto=format&n=T7GffHzZitf6TThi&q=85&s=81a8c440100333f3454ca984a5b0fe5a.vscode/launch.json
{
    "configurations": [
        {
            "name": "UltraRAG Debug",
            "type": "debugpy",
            "request": "launch",
            "program": "${workspaceFolder}/src/ultrarag/client.py",
            "console": "integratedTerminal",
            "args": [
                "run",
                "${workspaceFolder}/examples/rag_full.yaml" 
            ],
            "cwd": "${workspaceFolder}",
        }
    ]
}
If you want to debug other Pipelines, just replace the path in args with the corresponding YAML file path.

Step 3: Start Debugging

  1. Open the Debug panel on the left side of VSCode (shortcut Ctrl+Shift+D).
  2. Select UltraRAG Debug in the debug configuration.
  3. Click the green ▶ Start button to run and debug in the integrated terminal within VSCode.
You can set breakpoints in any Python file to observe the execution flow and variable states step by step.