$npx -y skills add tebjan/vvvv-skills --skill vvvv-debuggingSet 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 conf
| 1 | # Debugging vvvv gamma C# Projects |
| 2 | |
| 3 | For CLI arguments and session files, see the **vvvv-startup** skill. |
| 4 | |
| 5 | ## Context-Aware Setup Workflow |
| 6 | |
| 7 | 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. |
| 8 | |
| 9 | ### 1. Detect vvvv Installation |
| 10 | |
| 11 | Find vvvv.exe automatically by scanning `C:\Program Files\vvvv\` for `vvvv_gamma_*` directories: |
| 12 | |
| 13 | ```bash |
| 14 | ls -d "/c/Program Files/vvvv/vvvv_gamma_"* 2>/dev/null | sort -r |
| 15 | ``` |
| 16 | |
| 17 | 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. |
| 18 | |
| 19 | ### 2. Scan Workspace |
| 20 | |
| 21 | Detect what exists in the workspace: |
| 22 | - `.csproj` / `.sln` files (may or may not need build tasks -- see step 3) |
| 23 | - `.vl` files (candidates for `--open`) |
| 24 | - `help/` folders (common location for test patches) |
| 25 | - Existing `.vscode/launch.json` (extend rather than overwrite) |
| 26 | - Git submodules (especially `VL.StandardLibs` — see package repos warning below) |
| 27 | - Package names from repo folder name, main *.vl file or `.csproj` `<PackageId>` (for `--editable-packages`) |
| 28 | |
| 29 | ### 3. Ask User — ALL Questions Before Generating |
| 30 | |
| 31 | **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. |
| 32 | |
| 33 | #### Question Group 1: vvvv Version & Patch |
| 34 | - **Which vvvv version?** — Present detected versions, recommend the latest stable. Let user pick or specify a custom path. |
| 35 | - **Which .vl patch to open?** — List found `.vl` files as options. If `help/` folder exists, suggest those. |
| 36 | |
| 37 | #### Question Group 2: Launch Flags |
| 38 | - **`--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. |
| 39 | - **`--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. |
| 40 | - **`--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. |
| 41 | - **`--editable-packages`?** — Loads specified packages from source. Only useful with `--package-repositories`. Ask only if package-repositories is enabled. |
| 42 | |
| 43 | #### Question Group 3: Build Mode |
| 44 | - **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"`. |
| 45 | |
| 46 | ### 4. Generate Configuration |
| 47 | |
| 48 | Only after all questions are answered, generate `.vscode/launch.json` and optionally `.vscode/tasks.json`. |
| 49 | |
| 50 | **Always generate these configurations:** |
| 51 | 1. A launch config with the user's chosen flags |
| 52 | 2. An "Attach to vvvv" config for attaching to an already-running instance |
| 53 | |
| 54 | **Optionally generate:** |
| 55 | - A second launch config with `--debug` if the first one doesn't have it (or vice versa) |
| 56 | - A `tasks.json` if DLL/binary build mode was selected |
| 57 | |
| 58 | ## VS Code launch.json |
| 59 | |
| 60 | ### Minimal Config (source reference, no extras) |
| 61 | |
| 62 | The simplest possible config — just open a patch: |
| 63 | |
| 64 | ```json |
| 65 | { |
| 66 | "version": "0.2.0", |
| 67 | "configurations": [ |
| 68 | { |
| 69 | "name": "vvvv — MyPatch", |
| 70 | "type": "coreclr", |
| 71 | "request": "launch", |
| 72 | "program": "C:\\Program Files\\vvvv\\vvvv_gamma_7.1-win-x64\\vvvv.exe", |
| 73 | "args": [ |
| 74 | "-o", |
| 75 | "${workspaceFolder}/help/HowTo Use MyFeature.vl" |
| 76 | ], |
| 77 | "cwd": "${workspaceFolder}", |
| 78 | "stopAtEntry": false, |
| 79 | "console": "internalConsole" |
| 80 | }, |
| 81 | { |
| 82 | "name": "Attach to vvvv", |
| 83 | "type": "coreclr", |
| 84 | "request": "attach", |
| 85 | "processName": "vvvv.exe" |
| 86 | } |
| 87 | ] |
| 88 | } |
| 89 | ``` |
| 90 | |
| 91 | ### Full Config (with all optional flags) |
| 92 | |
| 93 | When the user opts in to |