Runtime evidence
A reference of the soundor-debug-plugin skill.
soundor-debug-plugin reads this reference when a task needs it. Source on GitHub
How to observe a running Soundor plugin (Soundor 0.21). Every command here
was run against a scaffolded plugin; check --help and the documentation
of the installed version.
Start a session
npm run dev # soundor dev vst3: build, open in the VST3 host
xvfb-run -a npm run dev # Linux without a displaydev prints the plugin, the DevTools URL (http://localhost:4545 by
default), the Debug bundle's path, and the DevTools session descriptor:
DevTools in an external host: start it with SOUNDOR_DEVTOOLS_SESSION=/tmp/soundor-devtools-…/….json in its environment.Export that variable for the Driver. The terminal shows the UI's
console output and uncaught errors with TypeScript stack frames; the full
native build output is in .soundor/dev/build.log. UI edits reload the UI
(its JavaScript state restarts); Rust edits rebuild and reopen the plugin;
config changes need a restart of dev.
Soundor Driver from the command line
Each command connects, does one thing, prints, and disconnects:
export SOUNDOR_DEVTOOLS_SESSION=/tmp/soundor-devtools-…/….json
npx soundor driver targets --json # connected plugin instances
npx soundor driver tree # the native UI tree
npx soundor driver inspect --role button --name Reset # bounds, styles, accessibility
npx soundor driver click --role button --name Reset
npx soundor driver drag gain-knob --dy -40 # by debugId; --steps for smoothness
npx soundor driver type "440" --debug-id freq-field
npx soundor driver key Enter
npx soundor driver screenshot ./now.png # --debug-id/--role/--text for one nodeNodes are found by debugId (a prop on node components, for tools only),
or by --role with --name, or by --text. Add --json for
machine-readable output. Give important nodes a debugId while debugging
(<View debugId="meter">); it is invisible to users.
tree output looks like this; the numbers are node ids:
View [1]
View [9]
Text "Gain: 0.50" (text "Gain: 0.50") [4]
View (button "Reset") [8]
Text "Reset" [7]Soundor Driver from a script
@soundor/driver/vst3 launches a Debug build in the VST3 host with its own
DevTools session, so no dev session is needed, and gives UI and audio in
one script:
import { launch } from '@soundor/driver/vst3';
const plugin = await launch({ plugin: '.soundor/debug/vst3/My Plugin.vst3' });
try {
console.log(await plugin.getByRole('button', { name: 'Reset' }).getBounds());
await plugin.parameter('Gain').set(0.25);
await plugin.host.process({ frames: 512 });
const input = new Float32Array(4800).fill(0.5);
const { outputs } = await plugin.host.process({ inputs: [[input, input]] });
console.log('last sample', outputs[0][0][4799]);
await plugin.getByRole('button', { name: 'Reset' }).click();
console.log(await plugin.parameter('Gain').get()); // normalized, plain, display
await plugin.screenshot({ path: 'after.png' });
} finally {
await plugin.close();
}Locators take strings; getByText(text, { exact: false }) matches part of
a text. A RegExp is not a locator.
The VST3 host alone
launchHost() from @soundor/vitest-e2e (or @soundor/vst3-host
directly) loads any VST3, release builds included, without an editor or a
display: process audio, set and read parameters by title, send MIDI and
transport, getState()/setState(), getLatency(). Use it to separate
"the audio is wrong" from "the UI shows it wrong".
A failed end-to-end test
.soundor/test-results/<test file>/<test name>/ holds screenshot.png,
tree.json (every node with type, text, bounds, accessibility) and
host.log. Open the screenshot and search the tree before changing code: a
test can fail because its locator is wrong while the plugin is right.
The web build
The Driver does not reach the web runtime. Build (npm run build:web),
serve .soundor/dist/web/, and use Playwright: page.on('console'),
page.on('pageerror'), page.screenshot(), and role-based locators (the
web runtime exposes Soundor's accessibility tree as ARIA). npm run dev:web
serves a development build with the same tools.
Toolchain and contract
npx soundor doctor --json: Node, package manager, Rust, linker, wasm target, prebuilt adapters, config validity.npx soundor gen --check: is the generated contract in step with the config?npx soundor licenses: what each runtime's build contains.