Dev Preview Tools
What you can do inside a Dev Preview panel: navigation and the toolbar, device emulation and viewport presets, find in page, plugin tools, and the Output, Console and Diagnostics drawer, including stop, restart and clear-cache controls.
Toolbar
From left to right:
- Back / Forward: move through page history. The tooltip names the page you would land on. Long-press either button, right-click it, or press ArrowDown on it for a list of earlier (or later) pages to jump to
- Reload: refresh the current page. Shift+click does a hard reload that ignores the cache. While a page is loading the button becomes Stop loading
- Address bar: shows the dev server's own address and route, such as
localhost:5173/dashboard, even though the page is served from Daintree's proxy origin (see How the preview is served). Edit it and press Enter to navigate; only localhost addresses open here, and anything else is refused with "Only localhost addresses open here". Suggestions from this project's history appear as you type, matched against the address you see. Copy URL sits at the right end of the field. When the page zoom isn't 100%, a zoom chip appears there too; click it for zoom out, zoom in and Reset - Plugin tools: buttons contributed by enabled plugins, such as SvelteKit Tools, shown only in previews they apply to
- Device mode (phone icon, tooltip "Preview on a device"): turns device emulation on and off. See Device emulation
- Console (terminal icon, tooltip "Show console"): opens and closes the drawer at the foot of the panel
- Copy screenshot to clipboard (camera icon): captures the visible page and copies it to the clipboard as a PNG. Disabled until the webview is ready, and skipped on blank pages
- Open in external browser: opens the page through a short-lived proxy bootstrap in your default browser. Application logins are separate from the embedded browser. See Opening the page in your real browser
- More page actions (
…): page zoom (Zoom in, Zoom out and Actual size, stepping through 25%, 50%, 75%, 100%, 125%, 150% and 200%), Toggle DevTools (Chromium DevTools for the previewed page, in a detached window), and Open in Portal, which promotes the current page into a Portal tab that shares this panel's session
When the toolbar is narrower than about 640 pixels, Copy URL and the console toggle move into More page actions, so the route in the address bar stays readable.
Command-R Control-R Control-R reloads the focused dev preview without touching the server process.
Device emulation
Dev Preview emulates real mobile devices, not just their user agent. Turn on a preset and you get full Chromium device emulation: a real mobile viewport, the correct window.devicePixelRatio, proper viewport-meta handling, touch and pointer media features (pointer: coarse, hover: none), and mobile scrollbars. Swapping only navigator.userAgent would leave layouts looking like a narrow desktop window rather than a phone.
Click Device mode (phone icon) in the toolbar to turn emulation on. It starts on the last device you used, iPhone 17 the first time, and a second toolbar row appears under the first. Its Choose device menu lists four presets, each carrying the matching device dimensions and user-agent string:
| Preset | Viewport (portrait) |
|---|---|
| Galaxy S26 | 360 × 780 |
| iPhone 17 | 393 × 852 |
| Pixel 10 | 412 × 923 |
| iPad Air 11" | 820 × 1180 |
With a device active, the page renders inside a rounded device frame, centered in the pane, with a label above it naming the device and its size (iPhone 17 · 393×852). The device row carries the current size and three more controls:
- Rotate (tooltip "Rotate to landscape"): swaps width and height to switch between portrait and landscape
- DPR: a 1× / 2× / 3× selector (default 1×) that sets the device scale factor, so high-DPR assets and
srcsetselection behave the way they would on the real device - Fit ("Scale the device down to fit the pane"): scales the device frame down to fit the pane, and adds the scale to the frame's label
Device, rotation, DPR and fit are per-panel state that Daintree remembers. There is nothing to configure in Settings for device emulation. Click Device mode again (tooltip "Exit device mode") to return to the desktop layout.
Find in page
Press Command-F Control-F Control-F to search the current page. A floating find bar appears in the top-right of the webview with a Find in page field, a Match case (Aa) toggle, a match counter, previous and next buttons, and a close button. It searches as you type and shows the current position ("3 of 12"), or "No results". The shortcut works whether the Daintree UI or the embedded page has focus; pressing it again while the bar is open refocuses and selects the input.
The find bar is the same component the Browser panel uses, and the shortcut table there applies here too.
Plugin tools
Enabled built-in plugins can add tools to Dev Preview. This contribution is currently reserved for plugins bundled with Daintree. Each one gets a toggle button in the toolbar, shown only while its plugin is enabled and only in previews it applies to, and can add a strip under the toolbar and a drawer beside the page. One tool is active per panel at a time. The drawer can be resized from its left edge; when the pane is too narrow to share, it floats over the page instead of squeezing the site through its own responsive breakpoints.
Daintree ships one such tool as a built-in plugin, off until you enable it: SvelteKit Tools, which traces an element on a running SvelteKit site to its source and hands a request about it to a coding agent in the same worktree.
Output, Console and Diagnostics
The drawer at the bottom of the panel toggles from the Output drawer button, whose chevron shows the open/closed state, or from the toolbar's console toggle. It opens on its own when the server fails, and when a start has gone 15 seconds with no URL and no sign of compiling. It has three tabs:
- Output: your dev server's terminal output, the same stream you would see if you ran the command yourself
- Console: the previewed page's browser console, with a red badge carrying the current error count
- Diagnostics: the session's lifecycle timeline and its current proxy state
A color-coded dot in the drawer header reports the server's state:
| State | Indicator | Meaning |
|---|---|---|
| Stopped | Grey | Server not running. This includes a server that was running when Daintree last closed and has not been started again: nothing is reattached |
| Starting | Amber | Process launched, waiting for the ready signal |
| Installing | Amber | Missing packages detected; dependencies are being installed |
| Running | Green | Server is up and serving |
| Stopping | Amber | Shutting the server process down |
| Error | Red | Server failed to start or crashed |
While a restart is underway the header shows a Restarting label in amber.
Stop and restart
A Stop dev server button sits in the drawer header whenever the server is starting, installing, running or stopping, and is disabled while a restart is already in flight. Stopping doesn't clear your configured command, so the panel shows Start the dev server with a Start dev server button rather than falling back to the setup prompt. The stop sticks: Daintree won't start that server again on its own until you press Start or pick a restart option, even across a relaunch. See Stops that stick.
Beside it, Restart dev server kills the server process and relaunches it, and More restart options (…) opens a menu with four options:
- Reload preview: reloads the page without touching the server process
- Restart dev server: kills the server process and relaunches it
- Restart and clear cache: relaunches after deleting framework build caches (
.next,.vite,.turbo,.svelte-kit,.astro,.nuxtandnode_modules/.vite) - Reinstall dependencies: relaunches after deleting
node_modulesand reinstalling
The last two ask for confirmation first and are disabled mid-install. The confirmation reads the dev server's folder before it offers anything, and says what it actually found:
- Clear cache and restart? lists the caches that exist, with each directory's size and when it was modified and the total it frees, and confirms with Clear cache. When there are no caches to delete it becomes Restart dev server? and only restarts.
- Reinstall dependencies? shows the folder, what it deletes, its size, the install command it runs and the lockfile it may update, and confirms with Reinstall dependencies. With no
node_modulesto delete it becomes Install dependencies?.
Size checks may still be pending or unavailable when the dialog opens. Daintree stops the server and waits for its port to become free before removing anything. These operations delete directories by their cache and dependency names, so keep hand-authored work out of them. Source files are not touched, though an install can rewrite the lockfile (or create one where there was none), and Git history is never a deletion target.
Console tab
The Console tab captures the previewed page's browser console through the Chrome DevTools Protocol: the same messages DevTools would show, structured rather than flattened to text:
- Level filters: All, Errors, Warn, and Log (Log includes
info). Errors and Warn carry counts - Filter…: narrows messages by content
- Message detail: a level badge (LOG / INF / WRN / ERR), a timestamp, the source file and line inline, an object inspector for logged objects, and collapsible console groups
- Stack traces: offered only for errors, warnings and
console.trace, where they say something. Runs of library frames fold into a single row you can expand. An uncaught exception opens with its frames showing - Copy: copy one message from its row, or every visible message from the toolbar
- Clear console: empties the captured log
Capture holds roughly the last 500 messages per panel, survives switching tabs, and is cleared when the panel is deleted. Messages from a previous page are dimmed rather than dropped after a navigation.
console.log calls and runtime errors). The Output tab shows the dev server's terminal output (build steps, compile errors, request logs). When something is wrong, check both. Console capture is specific to Dev Preview: Browser panels do not have it.Diagnostics tab
Diagnostics answers "what just happened?" without asking you to reconstruct it from logs. The top of the tab, Session diagnostics, is a summary: status (marked (restored) for a session brought back from the last run), allocated port, detected URL, what the proxy would dial right now, the proxy's own port (and whether it fell back off 43000), and crash-loop state. Refresh diagnostics rereads it. Below it is the lifecycle timeline, newest first: ensure requested, config changed, port allocated, spawned, command submitted, first output received, install started and finished, URL detected, each readiness probe attempt and what it saw ("Server responded", "Server error response" or "No response", with the time left in the budget), ready and compile lines seen, compile started and finished, restart and stop requests, process exits, crash-loop backoff, a skipped bundler preference, and proxy failures. Errors are tinted; repeated identical events carry a ×N count.
Each session keeps its last 100 events, and Daintree retains rings for the 50 most recently touched sessions, so a timeline outlives the panel that produced it. Free-text detail is capped at 200 characters, and identical consecutive proxy failures inside a 10-second window coalesce into one counted row, so a retrying webview can't flush the lifecycle history that explains it.
A proxy 502 always names its cause:
| Cause | What it means |
|---|---|
| No session registered for this origin | The origin isn't bound to a dev-preview panel, usually a stale tab or a page reopened after the panel was closed |
| Dev server isn't running | The panel exists but its server is stopped, starting, or errored |
| Dev server refused the connection | The port is not accepting connections, typically the server died or hasn't bound yet |
| Dev server timed out | The upstream accepted the connection but never answered within 30 seconds |
| Dev server connection failed | Anything else, with the underlying error code attached |
WebSocket upgrade failures are recorded the same way, which is what usually explains a preview that renders but never live-reloads.