Debugging
A Tynd app has three observable surfaces: WebView frontend, Bun backend, and Rust host/tooling.
Frontend DevTools
Section titled “Frontend DevTools”import { tyndWindow } from "@tynd/core/client";
await tyndWindow.openDevTools();await tyndWindow.closeDevTools();Use normal Console, Elements, Network, Sources, and Performance panels. Tynd assets/IPC use native schemes such as tynd:// and tynd-bin://, not a production loopback HTTP server.
Bun inspector
Section titled “Bun inspector”Use native CLI flags:
tynd dev --inspecttynd dev --inspect-brk--inspect-brk waits before user backend code. Connect with a Bun-compatible inspector client.
CLI logs
Section titled “CLI logs”tynd --verbose devtynd --log-format json --log-file .tynd/cli.log devtynd --quiet startGlobal flags may appear before or after the subcommand. --verbose enables debug-level CLI records; --quiet suppresses logger output. --log-file appends the rendered records and rejects a symbolic-link target.
Application/backend output still uses the host process streams. For a packed executable, redirect its stderr using normal OS shell facilities:
./release/linux-x64/my-app 2> app.logNative MCP/debug bridge
Section titled “Native MCP/debug bridge”tynd dev exposes a local authenticated debug endpoint unless --no-debug is used. The native Rust tynd-mcp server discovers a live app without a project-specific TypeScript MCP process:
bunx @tynd/mcp servebunx @tynd/mcp call app.infobunx @tynd/mcp call ipc.recent --args '{"n":20}'bunx @tynd/mcp tapEvaluation and external-launch capabilities remain opt-in through MCP flags. Discovery defaults to loopback endpoints. See tynd-mcp for the flags and environment variables.
Project diagnostics
Section titled “Project diagnostics”tynd infotynd validatetynd doctortynd doctor --stateinfo: Tynd/Bun versions and resolved host/bundler paths.validate: config/backend/frontend/package inputs;--ciadditionally resolves Bun pin, host, and bundler.doctor: config, entries, Bun, host, bundler, plus optional generated-state sizes.
These commands do not query the Windows registry, probe WebView availability, or perform a broad platform-tool preflight.
Common symptoms
Section titled “Common symptoms”Frontend never becomes ready
Section titled “Frontend never becomes ready”Tynd waits 30 seconds for configured/detected devUrl. Check the frontend command directly, then set devCommandArgs and devUrl explicitly when detection does not match the project.
Backend change asks for restart
Section titled “Backend change asks for restart”Config/plugin/API changes can alter the native host plan. Restart tynd dev; only compatible source changes use the live reload channel.
RPC call fails or hangs
Section titled “RPC call fails or hangs”- Confirm the backend export name and
app.start()call. - Check Bun/backend stderr.
- Inspect recent/failed IPC through
tynd-mcpwhiletynd devis running. - Confirm the frontend proxy uses the expected backend type.
OS call is denied
Section titled “OS call is denied”The API may be absent from the compiled host (its plugin is not declared) or a native plugin permission may not include api:method. Inspect config/plugin metadata; do not broaden permissions beyond the needed method.
Packaged app has no MCP endpoint
Section titled “Packaged app has no MCP endpoint”The discovery/debug socket is a development feature. The debug protocol is disabled in packaged apps unless they are built with tynd build --debug-protocol. Use that flag only for diagnostic builds; for shipped-user support build a dedicated diagnostic channel/log flow instead of exposing evaluation in production.