# ormaos path

> Shows the lines a call ran, in order, with the calls it made and the exceptions it handled in between, for calls inside a --path scope.

```text
ormaos path [-h] [--json] [--limit N] [--offset N] [address]
```

| Argument | From the parser | Default |
|---|---|---|
| `address` | `last` (the default), a recording such as r3, or an address inside one: r3:c42 (a call), r3:e5 (an exception), r3:i7 (an io event), r3:l2 (a logging record) | `last` |
| `--json` | print JSON on stdout. |  |
| `--limit N` | show at most N entries (default 40) | `40` |
| `--offset N` | skip the first N entries. |  |

Lines exist only for calls inside the scope given to `ormaos run --path`. Without an address inside a call, `path` lists the functions that have lines:

```console
$ ormaos path r2
r2: lines recorded in 1 function
  sync_orders job.py:49: 1 call, 261 steps  [r2:c130]
next: ormaos path r2:c130
```

With an exception, it shows the handler around the moment it caught it:

```console
$ ormaos path r2:e1 --limit 12
r2:c130 sync_orders job.py:49: 261 steps, showing 42-53
  42        call apply_order [r2:c165] returned
  43    56 |                 applied += 1
  44    52 |     for order in orders:
  45    53 |         try:
  46    54 |             validate.check_order(order)
  47        call check_order [r2:c167] raised
  48        exception validate.SkuFormatError [r2:e1] enters a handler here (swallowed)
  49    57 |         except Exception as exc:
  50    58 |             log.warning("order %s skipped: %s", order.order_id, exc)
  51    59 |             continue
  52    52 |     for order in orders:
  53    53 |         try:
... 208 more steps: --offset 53
next: ormaos exceptions r2:e1 | ormaos path r2:c130 --offset 53 | ormaos tree r2:c167 | ormaos tree r2:c130
```

Each step is a line of source (number, then the text after a `|`), a call it made (with its address and how it ended), or an exception entering a handler. The text of each line is read from your file when you ask; it is not in the recording. `path` has the lines of the functions inside the scope, not of the functions they call.

## Arguments

### `address`

A recording (the functions that have lines), a call, or an exception (the call that handled it). Default `last`.

### `--limit N`

At most N steps. Default 40.

### `--offset N`

Skips the first N steps. Without it, an exception address starts the window a little before the moment the exception entered the handler.

### `--json`

Kinds `paths` (the list of functions) and `path` (the steps of one call). Schemas: [/schemas/paths.json](/schemas/paths.json), [/schemas/path.json](/schemas/path.json).

## When there are no lines

```console
$ ormaos path r1
ormaos: no path in r1: lines are recorded only inside a scope given when recording
ormaos: next: ormaos run --path ok.py -- python ok.py
# exit code 1
```

---

Source: https://docs.ormaos.com/python/reference/cli/path/ · ormaos 0.0.1 · ormaos-python 968f69776c · ormaos-examples 6e27be5922
