Why Console.log and Debugger May Not Appear in Production (and How to Fix It in Slater)

When debugging production code in Slater, console output such as console.log statements or the use of debugger do not appear in your code. This occurs because Slater minifies your production JavaScript files by default. Minification removes whitespace and may also strip out debugging statements, making it difficult to trace issues using the browser console.

Why Does Minification Affect Debugging?

  • Minification optimizes JavaScript by removing unnecessary characters and eliminating debug statements to reduce file size and improve load times.
  • As a result, console.log and debugger statements are removed, making them invisible during runtime in production environments.

How to Disable Minification in Slater

To ensure that debugging statements remain available in your production build, minification can be turned off:

  1. Open your Slater project.
  2. Navigate to the project settings.
  3. Uncheck the Minify production files checkbox.
    4 Save your project settings and redeploy your production build.

Screenshot 2026-01-15 at 11.00.35 AM.png

Disabling minification will allow console.log and debugger statements to function as expected, making it easier to debug issues in production.

Slater uses Terser to handle file minification.


Additional Resources

Please refer to your Slater documentation for the latest updates on project settings and build configuration.

Jared Malan