<p>Just posting this here since I saw an official answer in Github:</p>

<blockquote>
  <p>This changed in <a href="https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#300-beta7---2017-03-10" rel="nofollow noreferrer">Beta 7</a>:</p>
  
  <p>UserException reports are now styled like other exceptions when Dev
  Mode is enabled, with the full stack trace shown.</p>
  
  <p>You can see your 404 template by requesting it directly, e.g. <a href="http://mysite.dev/404" rel="nofollow noreferrer">http://mysite.dev/404</a></p>
</blockquote>

<p><a href="https://github.com/craftcms/cms/issues/1613#issuecomment-293366095" rel="nofollow noreferrer">https://github.com/craftcms/cms/issues/1613#issuecomment-293366095</a></p>

CC BY-SA 4.0
2019-04-18T19:52:26.847Z
2019-04-18T19:52:26.847Z
Alex Kendrick
<p>Another option is to check the response code directly in your config/general.php file. </p>

<pre><code>'devMode' =&gt; http_response_code() == 200,
</code></pre>

<p>I suspect this "solution" will make peoples toes curl; as it's a bit hacky and probably won't work in all cases. So I'd recommend using this only in your dev environments. </p>

CC BY-SA 3.0
2018-02-14T09:44:02.703Z
2018-02-14T14:15:39.103Z
2018-02-14T14:15:39.103Z
Mark Notton
<p>Is there any way to get <strong>Craft 3</strong> to display 404.html and 503.html for the 404 and 503 pages while in devMode, as it did in Craft 2, rather than returning the entire Yii 2 error stack?</p>

<p>Sometimes, we have to bring a site temporarily offline (by way of toggle in the general settings tab) to add features, and we have to put it into dev mode for debug. We want the site to show the branded 503 page to the public instead of the stack page.</p>

CC BY-SA 3.0
2018-01-23T00:28:29.177Z
I'm confused... taking the site offline doesn't enable devMode?
Brad Bell
CC BY-SA 3.0
2018-01-23T01:07:00.183Z
Is that a thing? 0___0; Is this a new feature or has this always been the way it's been?
Dustin C
CC BY-SA 3.0
2018-01-23T13:02:27.517Z
I think he's saying that they take the site offline and sometimes enable `devMode` during that time to help them debug things.
andrew.welch
CC BY-SA 3.0
2018-01-23T18:02:44.330Z
@andrew.welch - Exactly! Does disabling a site through the control panel enable dev mode, though? If so - I never knew that was a feature, as it's not talked about very much. (That would be cool! And helpful.)
Dustin C
CC BY-SA 4.0
2018-07-09T07:40:07.477Z
Same here, I didn't know that was a feature until just now :-)
Jan
<craft3><404><yii>
Craft 3 404 and 503 pages in devMode
# Craft 3 404 and 503 pages in devMode

(Asked by: username_0 on 2018-01-22)

Is there any way to get **Craft 3** to display 404.html and 503.html for the 404 and 503 pages while in devMode, as it did in Craft 2, rather than returning the entire Yii 2 error stack?

Sometimes, we have to bring a site temporarily offline (by way of toggle in the general settings tab) to add features, and we have to put it into dev mode for debug. We want the site to show the branded 503 page to the public instead of the stack page.

**Tags:** craft3, 404, yii

> **Comments:**
> **username_1**: I'm confused... taking the site offline doesn't enable devMode?  
> **username_0**: Is that a thing? 0___0; Is this a new feature or has this always been the way it's been?  
> **username_2**: I think he's saying that they take the site offline and sometimes enable `devMode` during that time to help them debug things.  
> **username_0**: @username_2 - Exactly! Does disabling a site through the control panel enable dev mode, though? If so - I never knew that was a feature, as it's not talked about very much. (That would be cool! And helpful.)  
> **username_3**: Same here, I didn't know that was a feature until just now :-)  

---

## 2 answers

### Answer by username_4 on 2019-04-18. Score: 3

Just posting this here since I saw an official answer in Github:

> This changed in [Beta 7](https://github.com/craftcms/cms/blob/develop/CHANGELOG-v3.md#300-beta7---2017-03-10):
>
> UserException reports are now styled like other exceptions when Dev
> Mode is enabled, with the full stack trace shown.
>
> You can see your 404 template by requesting it directly, e.g. <http://mysite.dev/404>

<https://github.com/craftcms/cms/issues/1613#issuecomment-293366095>


---

### Answer by username_5 on 2018-02-14. Score: 0

Another option is to check the response code directly in your config/general.php file. 
'devMode' => http_response_code() == 200,

I suspect this "solution" will make peoples toes curl; as it's a bit hacky and probably won't work in all cases. So I'd recommend using this only in your dev environments.


---

