How to refresh an app

You can make changes to your code while you're debugging and then refresh the app by clicking the Refresh Windows app button on the Debug toolbar. Clicking this button reloads the app without stopping and restarting the debugger. The Refresh feature enables you to modify HTML, CSS, and JavaScript code and quickly see the result.

Refresh doesn't maintain your app state or reflect the following changes to your app:

  • Package manifest file changes, including changes to images specified in the package manifest.

  • Reference changes, such as adding or removing an SDK reference, or changes to Windows Runtime Components (.winmd files).

  • Resource changes, such as changes to strings in .resjson files.

  • Project file changes that result in path name changes, new project files, or deleted files.

  • Project and item property changes, such as changes to the selected debugging device, or changes to the package action for a file (in the Properties window).

Important

Refresh doesn't support changes to references while debugging. When you change references, you need to stop and restart the debugger to update HTML, CSS, and JavaScript source files.

To refresh an app

  1. In Visual Studio, create a new project in the Navigation App project template.

  2. With the template open in Visual Studio, select Simulator in the drop-down list that's next to the Start Debugging button on the Debug toolbar. This list is shown here:

    Running in the Simulator

  3. Press F5 to run the app in debug mode.

  4. Switch to Visual Studio. (Press F12.)

  5. In Solution Explorer, in the pages > home folder, open home.html.

  6. Change the page title text from

    Welcome to yourAppName!
    

    to something else, like this:

    Hello!
    
  7. Click the Refresh Windows app button, which looks like this: Refresh Windows app button. (Or press F4.)

  8. In the Simulator, the app is reloaded without the debugger restarting, and the new page title appears.

See Also

Concepts

Quickstart: Debugging apps (JavaScript)