# Run and iterate

Keep the feedback loop short: run one host, change one behavior, and inspect the result at more than one size. Use the same source files throughout.

## Start with the emulator

From a generated app folder named `FieldNotes`, run:

```sh
dotnet run --project FieldNotes.Emulator.csproj
```

The emulator runs a desktop process and presents your shared UI inside device chrome. Select a phone and rotate it to exercise portrait and landscape layouts. Its device information service reports the emulated form factor, so the starter selects its mobile navigation experience.

Use the Desktop project when you want the regular desktop window and sidebar:

```sh
dotnet run --project FieldNotes.Desktop.csproj
```

Resize the window gradually. Check the awkward intermediate widths, not just a wide desktop and a narrow phone. Long titles, enlarged text, and a visible keyboard often reveal layout assumptions earlier than a second screen size does.

## Rebuild predictably

Stop and rerun after changes to constructors, registrations, project references, resources, or runtime selection. That gives you a known fresh application state.

For an automatic rebuild/restart loop, try the .NET watcher on the project you are developing:

```sh
dotnet watch --project FieldNotes.Emulator.csproj --no-hot-reload
```

This asks the watcher to rebuild and restart rather than apply runtime hot-reload patches. Your in-memory page state is lost on restart. A source change cannot repair a stale browser asset cache or install a missing native workload; handle those separately.

## Separate the app from its host

A successful emulator run proves that the shared UI works in that emulator configuration. It does not prove native permissions, keyboard behavior, platform back navigation, packaging, or GPU backend support. Keep a short native smoke test for the platforms you ship.

For the Browser project, follow the generated project's launch configuration. Publishing produces static WebAssembly assets, but opening an `index.html` directly from disk does not replace an HTTP server. Resource paths and browser restrictions still apply.

When a change fails, reduce it to one page and one action. Record the project, configuration, window size, and exact input sequence. Those details turn “it looks wrong on mobile” into a reproducible layout or input case.

Continue with [Connect pages with NavigationShell](../../navigation/navigation-shell/index.md) when one page is no longer enough.
