When building apps in Power Apps, itβs important to know whether your app is currently running in Power Apps Studio (the editor) or in Power Apps Player (the runtime used by end users). This distinction allows you to create different behaviours for developers and end users which makes your app easier to manage.
Why Does This Matter?
Being able to detect the environment gives developers extra flexibility. For example:
π οΈ Safe testing β try out features that arenβt ready for production without affecting end users.
π₯ User role simulation β mimic how different users will interact with your app during development.
π Admin-only options β keep sensitive tools or debug buttons available only in Studio.
The Host Object to the Rescue
Power Apps provides the Host object, which contains information about where the app is running. Using this, you can check if your app is currently in Studio or Player.
A simple way to implement this is through a Named Formula so write following code in App.Formula property.
isAppInDesignMode = StartsWith(Host.Version, "PowerApps-Studio");
This formula will return true when the app is running in Studio and false when itβs in the Player.
Lets have some real use case for this :
When testing in Studio, most features run smoothly because youβre in a developer-friendly environment. But once the app is published and opened in Player, users may face issues. By detecting whether the app is running in Studio or Player, you can handle these cases gracefully. For example:
- In Studio β Always show the feature so developers can test.
- In Player β If the feature fails, show a clear notification and provide a fallback option (e.g., upload a file instead of using the camera, or enter location manually if GPS is blocked).
β This way, developers still get full flexibility during testing, while users get a reliable alternative instead of hitting errors.


