A script fails or Preview will not load
Use terminal evidence to diagnose a failed script or an unavailable Preview.
Last updated 16 September 2026
Use terminal evidence to diagnose a failed script or an unavailable Preview.
Before you start
Identify the saved script and the URL you intended to open. A terminal reporting success does not necessarily mean a web server is still running.
This terminal shows a deliberately stopped demo server. Check the last output and actual service URL before restarting or changing Preview.
Step by step
Open the terminal for the script and read its last output, exit status, and any reported URL or port.
Check the saved command through Run → Edit scripts. Confirm it is appropriate for this repository and that the required dependencies are installed.
For a stopped service, correct the error before using Restart. A normal verification script may exit successfully because it is not a long-running server.
For a port-in-use error, identify the process that owns the port or choose a suitable free port. Do not repeatedly launch duplicate instances.
When the service is running, open Preview with the actual URL it reports. Check the protocol, hostname, and port rather than copying a generic example.
If the URL works externally but not in Preview, record both results and the displayed error. Preserve useful terminal output for the support report.
What to expect
You can separate command failure, normal process exit, port conflicts, and preview-specific problems.
Troubleshooting and useful details
The screenshot shows a deliberately stopped demo server and its restart controls. KeyboardInterrupt after Control+C can be expected. For a static HTML file, a development server may not be necessary; use the local-file preview workflow when appropriate.
