Home » Php » Laravel 4 debugging not working

Laravel 4 debugging not working

Posted by: admin October 29, 2017 Leave a comment

Questions:

It’s extremely frustrating that I have ‘debug’ => true in the app config but all Laravel is showing is “Whoops, looks like something went wrong.” For the love of coding, does somebody know how to get debugging to work?

Answers:

I have faced the same problem. Laravel was showing only “Whoops, looks like something went wrong.” this line and not showing the actual error.Then I have checked the app/config/app.php file and changed "debug" => false to "debug" => true and it worked perfectly.

You said that you have also done it and still not working.I suggest you to run a composer update command for your project and then try again

Questions:
Answers:

Actually debugging is working fine for me with L4.0.7 when i set 'debug' => true in app/config/app.php
That switch tells Laravel to turn on Whoops and to bypass the ‘compiled.php’ file. When it is disabled, Whoops will not show. A normal server error page is served instead.

Were you expecting something else?

EDIT: maybe you are referring to “debugging” as the old profiler bar that were in L3 (Anbu). In that case I suggest you install this package

Questions:
Answers:

To be sure your app is in development mode, edit bootstrap/start.php, in the detectEnvironment function simply put your machine name. On linux use hostname terminal commande to determine your machine name.

$env = $app->detectEnvironment(array(
  'local' => array('homestead', 'Jeanphi'),
));

Questions:
Answers:

Check you haven’t renamed your app/config folder as fideloper suggests in the comment.

For example you might have renamed it to prevent overwriting the default config settings when copying your site somewhere else.

Questions:
Answers:

For all it’s worth, I was getting this error now after deployment because I didn’t create these folders:

/app/storage/cache
/app/storage/logs
/app/storage/meta
/app/storage/sessions
/app/storage/views

Questions:
Answers:

Some changes need an apache restart to take effect.

Questions:
Answers:

I came across problem recently, after separating out debug and a few other config options into a separate (dev.php) config file.

The in-hindsight obvious, by-logic obscure solution: Don’t move debug out of config/app.php

Questions:
Answers:

Had that same problem altought my app was in debug mode.
In my case I was deploying on server,and to make that work
you must take care of detectEnvironment variable.

It is located in bootstrap/start.php

$env = $app->detectEnvironment(array(

       'local' => array('your_server_name'),

));

as it’s instructed in the docs :

http://laravel.com/docs/4.2/configuration

Questions:
Answers:

well, i had the same problem several times and i have two possibilities.

  1. the folder storage doesn’t have the right permissions, you should use chmod 755 or chmod 777
  2. the public/index.php has none permission or a 777

like i said, this two options has occurred to me before, maybe there is some more, but i hope this can help to anyone

Questions:
Answers:

i got same problem with that…
first, laravel run well on windows using apache..
then while i’m using ubuntu and nginx, it shows “Whoops, looks like something went wrong.”

no error in php log and nothing found on laravel log..

so i tried modify path folder permission to 0777

sudo chmod -R 0777 {put your folder application folder here}

it works