Detect environment.

It is not intuitive in the development environment.