Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-22T15:14:44.733Z
Answers.Text: How did I miss that? Excellent, thanks.
Answers.UserDisplayName: 4midori
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-04-22T02:57:11.470Z
Answers.LastActivityDate: 2020-04-22T02:57:11.470Z
Answers.UserDisplayName: Brad Bell
Body: <p>Is there an easy way to enable devMode only to users logged in with specific permissions?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-19T07:47:07.973Z
Comments.Text: What exactly do you mean by „show devMode“?
Comments.UserDisplayName: Johannes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-19T15:29:45.320Z
Comments.Text: 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.
Comments.UserDisplayName: 4midori
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-19T15:35:09.427Z
Comments.Text: 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.
Comments.UserDisplayName: Johannes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-20T15:02:40.320Z
Comments.Text: 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.
Comments.UserDisplayName: 4midori
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-20T16:35:55.430Z
Comments.Text: 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.
Comments.UserDisplayName: Johannes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-20T20:25:59.070Z
Comments.Text: I don't think that's possible.
Comments.UserDisplayName: 4midori
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T06:40:10.047Z
Comments.Text: 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?
Comments.UserDisplayName: Johannes
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-04-21T15:34:11.727Z
Comments.Text: 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.
Comments.UserDisplayName: 4midori
Tags: <craft3><login><devmode>
Title: Limit DevMode to admin users?
ThreadText: # 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.  
  
  ---
  
  