How to run code
By default, your code runs automatically in PlayCode. Every time you make a change to a file, the code recompiles and runs.
Automatic execution
When you type in script.js, index.html, or any other file, you'll see the result in the console panel and preview in real-time. This is called Live Reload.
Manual controls
If you want to manually control when your code runs:
Stop button
Click the Stop button (square icon) at the top right of the page. This stops automatic code execution.
Reload button
Click the Reload button (circular arrow icon) next to the Stop button. This rebuilds your code and reloads the preview.
Hard Reset
If your project gets stuck or shows errors that shouldn't be there, perform a Hard Reset:
- Click the Stop button.
- Click the Reload button (or press it to Start again).
This clears the cache and rebuilds everything from scratch.
Disabling Live Reload
To turn off automatic code execution completely:
- Click the Menu icon (top left).
- Go to Project Settings.
- Uncheck Live Reload.
You can also add a Live View Delay (default is 0.1 seconds) to prevent the code from running too frequently while you type.
For more details, see How to turn off automatic code execution.
Related Articles
Need more help?
Can't find what you're looking for? Chat with us or send us an email.