What Dev Mode Does

When you enable Dev Mode in your config file, several things will change, making for a more optimal dev environment (either for website development or plugin development). Namely:

  • 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, as well as 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 CP’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.