> ## Documentation Index
> Fetch the complete documentation index at: https://docs.replit.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Preview

> Learn how to use Preview to view and interact with your web app as you build.

Preview shows your web app output and offers browser developer tools and debugging
capabilities.

When you launch your web app using the **Run** button, Replit assigns it a temporary URL
that's reachable on the internet. The Preview tool renders the page just as you would
see in a browser. It also includes developer tools with functionality similar to
what you find in popular browsers.

<Note>
  Preview is the new name for Webview.
</Note>

<Frame>
  <img src="https://mintcdn.com/replit/9NKf1XREDj9JhKJb/images/workspace/preview-tool.png?fit=max&auto=format&n=9NKf1XREDj9JhKJb&q=85&s=5ffbd7ac3ed55cbb43c25b699562cf22" alt="screenshot of the Preview tool" width="3078" height="1638" data-path="images/workspace/preview-tool.png" />
</Frame>

## Features

Preview includes the following functionality to let you seamlessly test and debug your web apps:

* **Live web view**: See your app and interact with it without leaving your browser tab
* **Developer tools**: Use built-in tools to diagnose problems quickly
* **Responsive testing**: View your app in different mobile device screen sizes

## Usage

The Preview tool automatically opens when you run a web app.
You can toggle this behavior in the **User Settings** tool under the **Automatic Preview** setting.

The following instructions explain how to open Preview.

<Accordion title="How to access Preview">
  From the left **Tool dock**:

  1. Select <img class="icon-svg" src="https://mintcdn.com/replit/X_IP1EeHGm0cA2VA/images/icons/workspace-all-tools-button.svg?fit=max&auto=format&n=X_IP1EeHGm0cA2VA&q=85&s=579643854fb13c402de516695e52c554" alt="All tools icon" width="16" height="16" data-path="images/icons/workspace-all-tools-button.svg" /> **All tools** to see a list of Project Editor tools.
  2. Select <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/preview-icon.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=8b00fd44ad201ff6e3da29968e682e82" alt="Preview icon" width="16" height="16" data-path="images/icons/preview-icon.svg" /> **Preview**.

  From the **Search bar**:

  1. Select the <img class="icon-svg" src="https://mintcdn.com/replit/X_IP1EeHGm0cA2VA/images/icons/workspace-search-icon.svg?fit=max&auto=format&n=X_IP1EeHGm0cA2VA&q=85&s=d3feed840da2d19e1ee4873d137114dc" alt="magnifying glass icon" width="16" height="16" data-path="images/icons/workspace-search-icon.svg" /> magnifying glass at the top to open the search tool
  2. Type "Preview" to locate the tool and select it from the results.
</Accordion>

## Location bar

The location bar at the top of the **Preview** tab includes the following tools:

* **Back button**: Navigate to the previous page in the browsing history
* **Forward button**: Navigate to the next page in the browsing history
* **App domain**: View information about your Replit App's temporary URL by selecting `{...}.replit.dev`
* **Address field**: View the current URL path or enter a new path

## Browser tools

The browser tools on the right side of the location bar include the following functions:

* **Screen size**: Select from different device screen size presets to test responsive designs
* **Devtools**: Toggle the [developer tools](#Developer_tools) pane
* **New tab**: Open your web app URL in a new browser tab

<Note>
  **Building a mobile app?** The Preview panel also supports previewing on an **iOS Simulator** or **Android Emulator**. See [Native Mobile Apps](/replitai/building-mobile-apps#preview-on-a-simulator-or-emulator) for details.
</Note>

## Developer tools

Developer tools, powered by the <a href="https://github.com/liriliri/eruda" target="_blank">Eruda</a> open source project, help you perform the following tasks:

* View and interact with the JavaScript console in the context of your app
* Inspect DOM elements
* Monitor network requests
* Configure display and behavior preferences

To access the developer tools, select the <img class="icon-svg" src="https://mintcdn.com/replit/X_IP1EeHGm0cA2VA/images/icons/wrench.svg?fit=max&auto=format&n=X_IP1EeHGm0cA2VA&q=85&s=a540aa91f7b9648546c4490083046bcb" alt="wrench icon" width="16" height="16" data-path="images/icons/wrench.svg" /> **Devtools**
button at the top of the **Preview** tab to toggle them.

The following sections describe the actions you can perform in each developer tools tab.

### Console

The **Console** tab displays JavaScript logs generated by your application.
In this tab, you can perform the following actions:

* **Clear output**: Remove all console output by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/clear.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=d806051b476ac9cfb4f03c8d98bf9fd9" height="16" width="16" alt="clear icon" data-path="images/icons/clear.svg" /> circle with slash icon.
* **Filter output**: View console output filtered by type (All, Info, Warning, or Error).
* **Filter matching text**: Show output that matches by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/filter.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=4251c041b4414742ca820fa9d7f17d20" height="16" width="16" alt="filter icon" data-path="images/icons/filter.svg" /> filter icon and entering the text.
* **Copy output**: Copy selected console messages by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/copy.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=0c42271e0e5b10f63bd15aa05e29dc6f" height="16" width="16" alt="copy icon" data-path="images/icons/copy.svg" /> copy button.
* **Run JavaScript code**: Run JavaScript code in your app's context by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/arrow-right.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=b35e5bb2c1e3ded1e42accd601849136" height="16" width="16" alt="right arrow icon" data-path="images/icons/arrow-right.svg" /> right angle brace. Enter the expression and select **Execute**.

### Elements

The **Elements** tab lets you inspect and modify the DOM structure of the web page.

* **View element details**: View details about the DOM element and the location in the HTML code
* **Copy output**: Copy selected console messages by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/copy.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=0c42271e0e5b10f63bd15aa05e29dc6f" height="16" width="16" alt="copy icon" data-path="images/icons/copy.svg" /> copy button.

Use the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/select.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=55bc0098436d7e4be1914bb1b5691c96" height="16" width="16" alt="select icon" data-path="images/icons/select.svg" /> arrow selection to toggle selection mode.
After entering selection mode, select an element on the web page.
The HTML and CSS for that element should appear in the Elements tab.

### Network

The **Network** tab monitors requests initiated by the web page.
In this tab, you can perform the following actions:

* **Track requests**: View all network requests initiated by your app. Select a request to view details.
* **Filter**: View matching results by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/filter.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=4251c041b4414742ca820fa9d7f17d20" height="16" width="16" alt="filter icon" data-path="images/icons/filter.svg" /> funnel icon to show results that match your text. Enter an empty filter to clear it.
* **Copy**: Copy storage information by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/copy.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=0c42271e0e5b10f63bd15aa05e29dc6f" height="16" width="16" alt="copy icon" data-path="images/icons/copy.svg" /> copy button.

### Resources

The **Resources** tab shows assets loaded by the page and browser storage, such as cookies and local storage.
You can view and refresh lists for the following asset types:

* JavaScript files
* Stylesheets
* Iframes
* Images

In this tab, you can perform the following actions:

* **View storage**: Review local storage, session storage, and cookies.
* **Filter**: View matching results by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/filter.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=4251c041b4414742ca820fa9d7f17d20" height="16" width="16" alt="filter icon" data-path="images/icons/filter.svg" /> funnel icon to show results that match your text. Enter an empty filter to clear it.
* **Clear**: Delete all data for that storage type by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/clear.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=d806051b476ac9cfb4f03c8d98bf9fd9" height="16" width="16" alt="clear icon" data-path="images/icons/clear.svg" /> clear button.
* **Delete selected**: Remove storage items by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/delete.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=54f83fa5b975b8074fad71ec1d19109a" height="16" width="16" alt="delete icon" data-path="images/icons/delete.svg" /> "X" icon.
* **Copy**: Copy storage information by selecting the <img class="icon-svg" src="https://mintcdn.com/replit/rJldsgYVucXB_6kW/images/icons/copy.svg?fit=max&auto=format&n=rJldsgYVucXB_6kW&q=85&s=0c42271e0e5b10f63bd15aa05e29dc6f" height="16" width="16" alt="copy icon" data-path="images/icons/copy.svg" /> copy button.

### Settings

The **Settings** tab allows you to customize the developer tools' appearance and behavior.
This tab includes customization options for the following:

* **Tool settings**: Customize options that apply to each tool tab
* **JavaScript controls**: Specify JavaScript behavior options, such as turning it off to test how your app behaves
* **Display preferences**: Change the theme, panel size, transparency, and other behavior of the developer tools
