What Dev Mode Does

When you enable Dev Mode, several things will change to benefit website and plugin development:

  • PHP errors and exceptions will be reported in the browser window, with a complete stack trace and code previews.
  • Template syntax errors will be reported in the browser with a preview of the offending template.
  • Craft will log the following items to craft/storage/logs/web.log for each request and make them available within your browser’s console for the current request:

    • Database queries and query profiling
    • Query string variables
    • Post data
    • Active cookies
    • Active session variables
  • PHP warnings and notices will get logged to craft/storage/logs/web.log (as opposed to just PHP errors and exceptions).

  • PHP errors that happen over Ajax will return the error and a stack trace as JSON.
  • The control panel’s front-end resource files won’t get cached.
  • Twig’s dump() function will be enabled.
  • Twig’s ‘debug’ and ‘strict_variables’ options will be set to true (see Twig’s Environment Options for more info).

As you can probably tell, Dev Mode is definitely not suited for production environments. To reduce the chance of Dev Mode being enabled accidentally, each page of the control panel gets a strip of striped yellow caution tape at the top of the left sidebar.

Applies to Craft CMS 3.