The Preview workspace tool lets you instantly view and interact with your web app.
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.
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.
How to access Preview
From the left Tool dock:
Select All tools to see a list of workspace tools.
Select Preview.
From the Search bar:
Select the magnifying glass at the top to open the search tool
Type “Preview” to locate the tool and select it from the results.
Developer tools, powered by the Eruda 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 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.
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 copy button.
Use the 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.
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 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 clear button.
Delete selected: Remove storage items by selecting the “X” icon.
Copy: Copy storage information by selecting the copy button.