Skip to content
vvvv-debugging logo

Debugging vvvv gamma C# Projects

vvvv-debugging

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, attac...

tebjan/vvvv-skills0installs32stars

SKILL.md

Full skill instructions

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:

  • .csproj / .sln files (may or may not need build tasks -- see step 3)
  • .vl files (candidates for --open)
  • help/ folders (common location for test patches)
  • Existing .vscode/​launch.json (extend rather than overwrite)
  • Git submodules (especially VL.StandardLibs — see package repos warning below)
  • Package names from repo folder name, main *.vl file or .csproj <PackageId> (for --editable-packages)

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
  • Which vvvv version? — Present detected versions, recommend the latest stable. Let user pick or specify a custom path.
  • Which .vl patch to open? — List found .vl files as options. If help/ folder exists, suggest those.
Question Group 2: Launch Flags
  • --debug flag? — Enables debug symbols for breakpoints but slows patching. Ask: "Enable --debug for breakpoints? (slower startup)" Default: No for fast iteration, Yes if user explicitly wants breakpoints.
  • --allowmultiple? — Allows launching a second vvvv instance. Ask: "Allow multiple vvvv instances? If No, launch will fail if vvvv is already running (useful to detect stale instances)." Default: No.
  • --package-repositories? — Points vvvv to scan a folder for packages. WARNING: If the workspace contains git submodules like VL.StandardLibs/, using --package-repositories ${workspaceFolder} will cause vvvv to recompile ALL core libraries from source, taking many minutes. Ask: "Add --package-repositories? Only needed if vvvv can't find your package. WARNING: if your repo has VL.StandardLibs or other library submodules, this will trigger full recompilation." Default: No.
  • --editable-packages? — Loads specified packages from source. Only useful with --package-repositories. Ask only if package-repositories is enabled.
Question Group 3: Build Mode
  • Source reference or DLL? — "Does your .vl document reference the .csproj directly (source reference, most common) or a pre-built DLL?" Source reference = no build task. DLL = add preLaunchTask: "build".

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:

  • A second launch config with --debug if the first one doesn't have it (or vice versa)
  • A tasks.json if DLL/​binary build mode was selected

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:

  • Omit preLaunchTask for source references -- vvvv handles C# compilation via Roslyn
  • Add preLaunchTask: "build" only for DLL/​binary references or complex build scenarios
  • --debug enables debug symbols (needed for breakpoints, but slows down patching)
  • --package-repositories tells vvvv where to find your package — WARNING: will recompile any VL library submodules found in the scanned folder tree
  • --editable-packages loads specified packages from source (glob patterns supported)
  • -o opens the specified .vl patch on startup
  • --allowmultiple allows a second vvvv instance — omit to detect stale instances
  • Use array items for args (not a single string) for readability

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:
    • Command: path to vvvv.exe
    • Command line arguments: -o YourPatch.vl (add --debug when breakpoints are needed)
    • Working directory: project folder
  4. 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

  • --debug -- forces debug symbol emission for reliable breakpoints, but adds overhead. Use in the Debug config; omit for performance/​deployment testing.
  • --stoppedonstartup -- launch paused so you can set breakpoints before any Update() runs
  • --nocache -- if breakpoints won't bind, force recompilation from source
  • Debugger.Break() -- add to C# code to programmatically trigger a breakpoint
  • Conditional breakpoints in Update() -- Update() runs every frame, so use hit counts or conditions
  • Constructor breakpoints -- fire on each live-reload cycle too (Dispose then new Constructor)
  • console: "internalConsole" -- captures Console.WriteLine output in VS Code debug console
  • Debugger-attached behavior -- when a .NET debugger is attached, vvvv initialization runs synchronously (no async exception trapping), so startup breakpoints work reliably

Common Pitfalls

  • --package-repositories + VL.StandardLibs submodule — If your workspace has a VL.StandardLibs/ git submodule (common in vvvv contrib repos), --package-repositories ${workspaceFolder} will cause vvvv to discover and recompile ALL standard libraries from source. This takes many minutes and is almost never what you want. Either omit --package-repositories or point it at a specific subfolder that doesn't contain library submodules.
  • --allowmultiple hiding stale instances — Without this flag, vvvv refuses to start if another instance is running. This is useful: it tells you there's a stale vvvv process. With --allowmultiple, you might accidentally run two instances consuming double resources.
  • --debug slowing everything — Debug symbol emission significantly slows vvvv's live compilation. Only enable when you actually need breakpoints. For quick iteration (testing UI, checking behavior), omit it.

More skills from tebjan

vvvv-shaders logo
tebjan/vvvv-skills

vvvv-shaders

Helps write SDSL shaders for Stride and vvvv gamma — TextureFX, shader mixins, compute shaders, and ShaderFX composition. SDSL is a superset of HLSL, so use this skill when writing or debugging .sdsl shader files, GPU shaders, visual effects, HLSL code for vvvv, working with the Stride rendering ...

32 0
View
vvvv-startup logo
tebjan/vvvv-skills

vvvv-startup

Covers launching vvvv gamma from the command line or programmatically -- normal startup, opening specific .vl patches, command-line arguments, package repositories, and key filesystem paths (install directory, user data, sketches, exports, packages). Use when starting vvvv, configuring launch arg...

32 0
View
vvvv-fileformat logo
tebjan/vvvv-skills

vvvv-fileformat

Describes the .vl XML file format used by vvvv gamma — document structure, element hierarchy, ID system (base62 GUIDs), NodeReference/Choice patterns, Pins, Pads (IOBoxes), Links, ProcessDefinition/Fragment lifecycle, regions (If/ForEach/Cache), type definitions, TypeAnnotations, and property ser...

32 0
View
vvvv-dotnet logo
tebjan/vvvv-skills

vvvv-dotnet

Helps with .NET integration in vvvv gamma — NuGet packages, library references, .csproj project configuration, the [assembly: ImportAsIs] attribute, vector type interop, and async patterns. Use when adding NuGet packages, configuring build settings, referencing external .NET libraries, setting up...

32 0
View
vvvv-testing logo
tebjan/vvvv-skills

vvvv-testing

Set up and run automated tests for vvvv gamma packages and C# nodes -- VL.TestFramework with NUnit for library/package authors (CI-ready), test .vl patches with assertion nodes, and lightweight agent-driven test workflows. Use when writing tests for vvvv packages, setting up test infrastructure, ...

32 0
View
vvvv-patching logo
tebjan/vvvv-skills

vvvv-patching

Explains vvvv gamma visual programming patterns — dataflow, node connections, regions (ForEach/If/Switch/Repeat/Accumulator), channels for reactive data flow, event handling (Bang/Toggle/FrameDelay/Changed), patch organization, and common anti-patterns (circular dependencies, polling vs reacting,...

32 0
View
vvvv-troubleshooting logo
tebjan/vvvv-skills

vvvv-troubleshooting

Diagnoses and fixes common vvvv gamma errors in C# nodes, SDSL shaders, and runtime behavior. Use when encountering errors, exceptions, crashes, red nodes, shader compilation failures, missing nodes in the browser, performance issues, or unexpected behavior.

32 0
View
vvvv-node-libraries logo
tebjan/vvvv-skills

vvvv-node-libraries

Helps set up C# library projects that provide nodes to vvvv gamma — project directory structure, Initialization.cs with AssemblyInitializer, service registration via RegisterService, IResourceProvider factories, ImportAsIs / ImportNamespace / ImportType selection, category organization, .csproj s...

32 0
View
vvvv-spreads logo
tebjan/vvvv-skills

vvvv-spreads

Helps write code using vvvv gamma's Spread<T> immutable collection type and SpreadBuilder<T>. Use when working with Spreads, SpreadBuilder, collections, arrays, iteration, mapping, filtering, zipping, accumulating, or converting between Span and Spread. Trigger whenever the user writes collection...

32 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View