Vvvv debugging

From tebjan/vvvv-skills · View interactive version

Vvvv debugging is an AI agent skill from the GitHub repository tebjan/vvvv-skills. Set up debugging for vvvv gamma C# node projects -- generate VS Code launch.json and tasks.json configurations, attach debugger to running vvvv, configure Visual Studio debug profiles, and use debugging best practices. Use when setting up a debugger for vvvv, creating launch configurations, attachin

How to use this skill

Skill file

Debugging vvvv gamma C# Projects

For CLI arguments and session files, see the vvvv-startup skill.

Context-Aware Setup Workflow

When the user asks to set up debugging, follow this workflow. Ask ALL configuration questions upfront using AskUserQuestion before generating any files. Do NOT assume defaults — always confirm with the user.

1. Detect vvvv Installation

Find vvvv.exe automatically by scanning C:\Program Files\vvvv\ for vvvv_gamma_* directories:

ls -d "/c/Program Files/vvvv/vvvv_gamma_"* 2>/dev/null | sort -r

Directory name format: vvvv_gamma_MAJOR.MINOR[-BUILD-gHASH-PLATFORM]. Sort by version descending. Filter out -beta, -alpha, -rc, -test, -dev variants unless no stable version exists.

2. Scan Workspace

Detect what exists in the workspace:

3. Ask User — ALL Questions Before Generating

CRITICAL: Ask all of these questions using AskUserQuestion BEFORE generating any configuration. Use multi-question format to batch related questions. Do not generate launch.json until all answers are collected.

Question Group 1: vvvv Version & Patch
Question Group 2: Launch Flags
Question Group 3: Build Mode

4. Generate Configuration

Only after all questions are answered, generate .vscode/launch.json and optionally .vscode/tasks.json.

Always generate these configurations:

  1. A launch config with the user's chosen flags
  2. An "Attach to vvvv" config for attaching to an already-running instance

Optionally generate:

VS Code launch.json

Minimal Config (source reference, no extras)

The simplest possible config — just open a patch:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "vvvv — MyPatch",
      "type": "coreclr",
      "request": "launch",
      "program": "C:\\Program Files\\vvvv\\vvvv_gamma_7.1-win-x64\\vvvv.exe",
      "args": [
        "-o",
        "${workspaceFolder}/help/HowTo Use MyFeature.vl"
      ],
      "cwd": "${workspaceFolder}",
      "stopAtEntry": false,
      "console": "internalConsole"
    },
    {
      "name": "Attach to vvvv",
      "type": "coreclr",
      "request": "attach",
      "processName": "vvvv.exe"
    }
  ]
}

Full Config (with all optional flags)

When the user opts in to all flags:

{
  "version": "0.2.0",
  "configurations": [
    {
      "name": "Debug with vvvv",
      "type": "coreclr",
      "request": "launch",
      "program": "C:\\Program Files\\vvvv\\vvvv_gamma_7.0-win-x64\\vvvv.exe",
      "args": [
        "--package-repositories",
        "${workspaceFolder}",
        "--editable-packages",
        "VL.MyPackage*",
        "-o",
        "${workspaceFolder}/help/HowTo Use MyFeature.vl",
        "--debug",
        "--allowmultiple"
      ],
      "cwd": "${workspaceFolder}",
      "stopAtEntry": false,
      "console": "internalConsole"
    },
    {
      "name": "Attach to vvvv",
      "type": "coreclr",
      "request": "attach",
      "processName": "vvvv.exe"
    }
  ]
}

DLL/Binary Reference (external build required)

Add preLaunchTask to build C# before launching vvvv:

{
  "name": "Debug with vvvv (pre-build)",
  "type": "coreclr",
  "request": "launch",
  "preLaunchTask": "build",
  "program": "C:\\Program Files\\vvvv\\vvvv_gamma_7.0-win-x64\\vvvv.exe",
  "args": [
    "-o",
    "${workspaceFolder}/help/HowTo Use MyFeature.vl",
    "--debug"
  ],
  "cwd": "${workspaceFolder}",
  "stopAtEntry": false,
  "console": "internalConsole"
}

Key points:

Attach to Running vvvv

Use attach when vvvv is already running and you want to debug without restarting:

{
  "name": "Attach to vvvv",
  "type": "coreclr",
  "request": "attach",
  "processName": "vvvv.exe"
}

VS Code tasks.json (only for DLL/binary reference setups)

Only generate tasks.json when the project requires external building (DLL references, native dependencies, Release builds). Skip this entirely for source project references where vvvv compiles C# at runtime.

Build with dotnet

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "command": "dotnet",
      "type": "process",
      "args": ["build", "${workspaceFolder}/src/MyProject.csproj", "-c", "Debug"],
      "problemMatcher": "$msCompile",
      "group": { "kind": "build", "isDefault": true }
    },
    {
      "label": "build-release",
      "command": "dotnet",
      "type": "process",
      "args": ["build", "${workspaceFolder}/src/MyProject.csproj", "-c", "Release"],
      "problemMatcher": "$msCompile"
    }
  ]
}

Build with MSBuild (for .sln or projects requiring Visual Studio toolchain)

{
  "version": "2.0.0",
  "tasks": [
    {
      "label": "build",
      "type": "shell",
      "command": "& 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\MSBuild\\Current\\Bin\\MSBuild.exe' '${workspaceFolder}/src/MyProject.sln' -p:Configuration=Debug -p:Platform=x64 -t:Rebuild -v:minimal",
      "options": {
        "shell": { "executable": "powershell.exe", "args": ["-Command"] }
      },
      "problemMatcher": "$msCompile",
      "group": { "kind": "build", "isDefault": true }
    }
  ]
}

Prefer dotnet build unless the project requires MSBuild-specific features or a .sln with platform targets.

Visual Studio Setup

Debug via External Program

  1. Open .csproj in Visual Studio
  2. Debug > Debug Properties (or Project Properties > Debug > General)
  3. Create a new launch profile:
  1. Press F5 to launch with debugger attached

Attach to Process

  1. Launch vvvv normally (add --debug if you need breakpoints)
  2. Debug > Attach to Process (Ctrl+Alt+P)
  3. Find vvvv.exe in the process list
  4. Select Managed (.NET Core, .NET 5+) as code type
  5. Click Attach

launchSettings.json (dotnet tooling)

{
  "profiles": {
    "Debug vvvv": {
      "commandName": "Executable",
      "executablePath": "C:\\Program Files\\vvvv\\vvvv_gamma_6.8-win-x64\\vvvv.exe",
      "commandLineArgs": "-o YourPatch.vl",
      "workingDirectory": "$(ProjectDir)"
    }
  }
}

Debugging Tips

Common Pitfalls

may need one tick for the whole runtime, while each document has its own frame

clock. Trace the installed runtime's Update/Draw/Present sequence and verify

where a callback actually runs; a frame-finished name does not prove an

after-Present hook. An individual game system's EndDraw does not prove all

systems have finished rendering. Keep shared SDK frame identity consistent

across constants, resource tags and markers.

assembly version, member visibility and actual emitted API before writing a

plugin or test harness. An internal runtime method visible in decompiled code

is not necessarily callable by a package; use the supported public entry point.

method's emission before choosing a debugger. A native source breakpoint can

remain unbound for a managed method even when native symbols match. A failed

debugger expression evaluation is not proof that the method never ran; inspect

accessible managed caller state when mixed-mode evaluation is unavailable.

CodeView RSDS GUID and age with the PDB identity. Matching filenames or adding a

symbol directory does not fix an identity mismatch. Check the loaded module

path as well as the artifact you built.

GPU usage and adapter-wide usage are different quantities; shared resources

and residency can affect attribution. Counter disagreement alone neither

proves a leak nor clears unexplained growth. Correlate allocation/disposal

lifetimes, GPU fence progress and residency, and keep memory budgets active

while investigating.

Keep this knowledge growing

Leave the next patcher one fewer mystery. On first use of any skill in this

collection with no successful check in seven days, compare the source with

tebjan/vvvv-skills. If no record exists, check once.

Share one local check timestamp/revision across these skills; do not poll per invocation.

Preserve local extensions and pinned project versions; checking is not permission

to install updates. If offline, record the deferred check and continue the task.

When actual work exposes a gap, capture the tested vvvv/package versions, a

minimal reproduction or authoritative source, and the observed result. Treat

other users' reports as leads, not facts until verified. Improve the smallest

relevant instruction; do not turn one example into a universal rule. Redact

private data and obtain publishing authorization before submitting upstream.

See the contribution policy.

Merged improvements reach users through their installer/update workflow, not

through a local edit or an automatic overwrite of everyone's skills.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.