<blockquote>
  <p>The goal for enabling dev mode so I can troubleshoot things while not showing those ugly errors to anyone else.</p>
</blockquote>

<p>If that's all you're looking for, there is a per-user account setting for this under the user account's preferences:</p>

<p><a href="https://i.sstatic.net/BHMIG.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/BHMIG.png" alt="enter image description here"></a></p>

CC BY-SA 4.0
2020-04-22T15:14:44.733Z
How did I miss that? Excellent, thanks.
4midori
CC BY-SA 4.0
2020-04-22T02:57:11.470Z
2020-04-22T02:57:11.470Z
Brad Bell
<p>Is there an easy way to enable devMode only to users logged in with specific permissions?</p>

CC BY-SA 4.0
2020-04-19T07:47:07.973Z
What exactly do you mean by „show devMode“?
Johannes
CC BY-SA 4.0
2020-04-19T15:29:45.320Z
I want to enable dev mode, which is usually done in the config file. But I only want to show it to people logged in as admin.
4midori
CC BY-SA 4.0
2020-04-19T15:35:09.427Z
If you mean the visual devMode indicator you may be able to inject some CSS that hides it for some users. You may write a small module for this. Note that the devMode is not meant to be used in production environments. Maybe there is another solution to your problem.
Johannes
CC BY-SA 4.0
2020-04-20T15:02:40.320Z
No, not dev mode in the control panel, but on the live site. For example, users who are not logged in as admin should see a regular 404 page when they hit something that would trigger it. But logged in admin users would get the dev mode messaging, for troubleshooting.
4midori
CC BY-SA 4.0
2020-04-20T16:35:55.430Z
I see, if Craft allows you to set config values during runtime then you could set the `devMode` variable to `true` or `false` based on the current user.
Johannes
CC BY-SA 4.0
2020-04-20T20:25:59.070Z
I don't think that's possible.
4midori
CC BY-SA 4.0
2020-04-21T06:40:10.047Z
You can see what the devMode does here: https://craftcms.com/guides/what-dev-mode-does. I don‘t think you can disable this. Would a multi environment setup solve your problem, like setting up a staging server on a different domain? This is quite common practice. Anyways, what is the goal behind enabling devMode for admins at all?
Johannes
CC BY-SA 4.0
2020-04-21T15:34:11.727Z
Yes, a multi-environment set up would address the issue. I am a holdout, I have just a production box. The goal for enabling dev mode so I can troubleshoot things while not showing those ugly errors to anyone else. Thanks.
4midori
<craft3><login><devmode>
Limit DevMode to admin users?
# Limit DevMode to admin users?

(Asked by: username_0 on 2020-04-17)

Is there an easy way to enable devMode only to users logged in with specific permissions?

**Tags:** craft3, login, devmode

> **Comments:**
> **username_1**: What exactly do you mean by „show devMode“?  
> **username_0**: I want to enable dev mode, which is usually done in the config file. But I only want to show it to people logged in as admin.  
> **username_1**: If you mean the visual devMode indicator you may be able to inject some CSS that hides it for some users. You may write a small module for this. Note that the devMode is not meant to be used in production environments. Maybe there is another solution to your problem.  
> **username_0**: No, not dev mode in the control panel, but on the live site. For example, users who are not logged in as admin should see a regular 404 page when they hit something that would trigger it. But logged in admin users would get the dev mode messaging, for troubleshooting.  
> **username_1**: I see, if Craft allows you to set config values during runtime then you could set the `devMode` variable to `true` or `false` based on the current user.  
> **username_0**: I don't think that's possible.  
> **username_1**: You can see what the devMode does here: https://craftcms.com/guides/what-dev-mode-does. I don‘t think you can disable this. Would a multi environment setup solve your problem, like setting up a staging server on a different domain? This is quite common practice. Anyways, what is the goal behind enabling devMode for admins at all?  
> **username_0**: Yes, a multi-environment set up would address the issue. I am a holdout, I have just a production box. The goal for enabling dev mode so I can troubleshoot things while not showing those ugly errors to anyone else. Thanks.  

---

## 1 answers

### Answer by username_2 on 2020-04-22. Score: 3 | Accepted answer

> The goal for enabling dev mode so I can troubleshoot things while not showing those ugly errors to anyone else.

If that's all you're looking for, there is a per-user account setting for this under the user account's preferences:

[![enter image description here](https://i.sstatic.net/BHMIG.png)](https://i.sstatic.net/BHMIG.png)

> **Comments:**
> **username_0**: How did I miss that? Excellent, thanks.  

---

