Bird
0
0

Which of the following is the correct way to enable debug mode in Laravel?

easy📝 Syntax Q12 of 15
Laravel - Configuration and Environment
Which of the following is the correct way to enable debug mode in Laravel?
ASet <code>APP_DEBUG=false</code> in <code>.env</code>
BSet <code>APP_DEBUG=true</code> in <code>.env</code>
CAdd <code>debug_mode=on</code> in <code>config/app.php</code>
DRun <code>php artisan debug:on</code> in terminal
Step-by-Step Solution
Solution:
  1. Step 1: Locate where debug mode is set

    Laravel uses the .env file to set environment variables like APP_DEBUG.
  2. Step 2: Correct value to enable debug

    Setting APP_DEBUG=true enables debug mode; false disables it.
  3. Final Answer:

    Set APP_DEBUG=true in .env -> Option B
  4. Quick Check:

    Enable debug by APP_DEBUG=true [OK]
Quick Trick: Enable debug by setting APP_DEBUG=true in .env [OK]
Common Mistakes:
  • Setting APP_DEBUG=false to enable debug
  • Trying to enable debug in config/app.php
  • Using artisan commands that don't exist

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes