Osy#the first language built for agents
Agents firstAgentic appsWorkflowsDurable Execution — built inSecurityTestingThe editorThe UI modelOne program

Reference / Testing

Debugging tests locally

osy debug-test --test <id> [path]

Debugs one of your app's tests against a Platform on your own machine — breakpoints, stepping, and variable inspection in your editor — with no account and no network. `osyrin dev` starts the platform; your editor launches the debugger through `osy debug-test`.

stable2 examples compiled by CItestingdebuggingauthoringcli

Summary#

Debugs a single test against a Platform running on your own machine. You set a breakpoint in a test, launch the debugger from your editor, and the run pauses where you asked — with the call stack, the current line, and your variables all inspectable. It is the debugging counterpart of Running tests locally: same local platform, same throwaway-copy isolation, same enforced security — you are simply watching one test run under a debugger instead of reading a pass/fail report.

Signature#

osy debug-test --test <id> [path]

Description#

Debug from your editor#

With a local platform running (osyrin dev), open a test file in an editor that has the Osy# extension, set a breakpoint on a line inside a [Test], and start debugging. The editor launches the debugger for you and drives the session; osy debug-test is the command it runs behind the scenes to reach the local platform. As with Running tests locally, there is nothing to log into and nothing to deploy — it finds the running local platform for your project, ensures your app exists there, compiles the source on your disk, and debugs against that.

One test at a time#

A debug session runs exactly one test, named by its id (file::fixture::name) — the same id Running tests locally uses with --test. That is why the flag is --test <id> and not repeatable: a debugger pauses inside one test, not across a suite. Pick the test in your editor's test view, or pass its id.

The test runs exactly as it would anywhere#

Debugging is not a weaker mode. Your app's own security is enforced just as in production: a [Test] runs as an anonymous, secured caller, so a test that reads or creates data needs your model to grant it. The test runs in its own throwaway clone that is discarded when the session ends — nothing it writes survives, and your real data is never touched. See Running tests for the full model.

Debugging against a remote platform#

The same gesture works against a deployed app with osyrin app debug-test --test <id>. It is the remote twin of this command, exactly as Running tests is the remote twin of Running tests locally — the only difference is which platform it reaches.

Examples#

Start a local platform, then debug one test from your editor (which invokes the command for you):

# terminal 1
osyrin dev
// model/order.osy — behaviour lives on a class, so it can be stepped through.
class Order {
  public decimal Total;
  public void AddLine(decimal amount) { Total = Total + amount; }
}
// tests/orders.test.osy
[Test]
void Totals_Add_Up() {
  var order = new Order { };          // ← set a breakpoint here, then start debugging
  order.AddLine(20);
  order.AddLine(5);
  Assert.Equal(25, order.Total);
}

The equivalent invocation the editor makes:

osy debug-test --test "tests/orders.test.osy::Seeded::Totals_Add_Up"

See also#

Running tests locally — run your tests locally without a debugger, and the full description of the local platform, isolation, and enforced security.

Running tests — the same run against a remote platform.

Related

Running tests locally

Runs your app's tests against a Platform on your own machine — no account, no network, no setup beyond a running local…

Running tests

Runs your app's tests against a throwaway copy of its database, reporting each test as it finishes. Your local source…

Running a local platform

Runs a full platform on your own machine — its own database, no account, no cloud, reachable only from your computer…