> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt ## Resource: About Testing Code in Preview Mode ## Article: About Testing Code in Preview Mode ## Article Link: https://dev.wix.com/docs/develop-websites-sdk/test-your-site/debug-your-code/about-testing-code-in-preview-mode.md ## Article Content: # About Testing Code in Preview Mode You can use Preview mode to test most code on a site before publishing. You can perform actions in Preview mode that you would be able to perform on a live site. When testing a site, you can check if any errors appear in the [Wix Developer Console](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/debug-your-code/about-debugging-your-code.md#debug-with-the-developer-console). ## Supported IDEs Preview mode is available in Wix Studio and Wix Editor. If you're developing in the [Wix IDE](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/wix-ide/about-the-wix-ide.md) or the [Local IDE](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/developer-environments/ides/git-integration/about-git-integration-with-wix-cli.md), you can open a site in Wix Studio or Wix Editor to use Preview mode. ## Differences between preview mode and published sites Although you can view pages and interact with a site and data in Preview mode, the site doesn't behave exactly as it does when published: - When previewing a site, you are assigned the Admin [role](https://support.wix.com/en/article/about-database-collection-permissions#roles). That means you are granted all possible [permissions](https://support.wix.com/en/article/database-permissions#permissions). Users of a live site might have different permissions and therefore have more restricted access. - When previewing a site with [sandbox enabled](https://support.wix.com/en/article/about-sandbox-and-live-collections-and-syncing), you're working with the data in the site's optional [sandbox database](https://support.wix.com/en/article/sandbox-data-vs-live-data#sandbox-data). Users of a live site work with the live database. Wix app collections, however, only have the live database version. Any changes you make to these collections in Preview mode are reflected in the published site. - Backend events and several other APIs don't necessarily work when previewing a site. These are noted in the API reference. > You can try out a test version of your published site on a small percentage of visitors using a [test site](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/work-with-test-sites/about-test-sites.md). This is helpful for testing functionality that only works on a published site without exposing that functionality to all site visitors. ## Handling errors If you see errors or a site isn't running as expected, there are tools you can use to debug the code in the site. - [Developer console](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/debug-your-code/about-debugging-your-code.md#debug-with-the-developer-console): Debug in Preview mode. - [Functional testing](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/test-backend-functions/about-functional-testing.md): Trigger and debug backend code in the code editor. - [Browser developer tools](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/debug-your-code/about-debugging-your-code.md#debug-with-your-browsers-developer-tools): Debug sites in Preview mode, published sites, and test sites. - [Logs](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/debug-your-code/about-debugging-your-code.md#debug-with-wix-logs): Debug in Preview or Published mode. ## Collections in preview mode When you've finished previewing and return to the editor, interactions you had with a site aren't maintained. The site returns to the state it was in before you entered Preview mode. The only exception is collection data. Changes you make to collection data in preview persist even after you exit Preview mode. ## See also - [About Debugging Your Code](https://dev.wix.com/docs/develop-websites-sdk/test-your-site/debug-your-code/about-debugging-your-code.md)