Sometimes, at runtime, you need to detect whether the application is running in Hosted Mode or not. E.g. you might decide to enable client side logging using GWT-Log only when the application is executing in Hosted Mode. The logging should be disabled once the application is deployed.
To check whether the application is executing in Hosted Mode, use the below API:
boolean isExecutingInHostedMode = GWT.isScript();