Skip to content

Visual Studio Code Integration

You can set up a Visual Studio Code task to launch VSView on the file you are currently editing. This is useful for quickly previewing VapourSynth scripts.

Task configuration

Create (or extend) .vscode/tasks.json in your project:

.vscode/tasks.json
{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "VSView",
      "type": "shell",
      "command": {
        "value": "${command:python.interpreterPath}",
        "quoting": "strong"
      },
      "args": [
        "-m",
        "vsview",
        { "value": "${file}", "quoting": "strong" }
      ],
      "group": {
        "kind": "none",
        "isDefault": true
      },
      "presentation": {
        "reveal": "always",
        "panel": "shared"
      }
    }
  ]
}

${command:python.interpreterPath} resolves to the Python interpreter currently selected in Visual Studio Code (via the Python extension), so the task works regardless of where the virtual environment lives or which platform you are on. Make sure VSView is installed in that interpreter's environment.

With your script open, run the task via Terminal → Run Task… → VSView, or bind it to a shortcut by adding a keybinding for workbench.action.tasks.runTask with "args": "VSView".

Avoid launch.json / debugpy

Prefer a task over a debug launch configuration (type: "debugpy" in launch.json). Running VSView under the debugger can degrade performance and cause deadlocks, especially when breakpoints are set.