简体   繁体   English

在Mamp中记录symfony

[英]Logs symfony in Mamp

I use Mamp to work with Symfony, but II can not see the logs 我使用Mamp与Symfony合作,但我看不到日志

For Example 例如

public function indexAction () {

    $user = news User();
    $form = $this->createForm(new UserType(), $user);

    return array(
        'formUser' => $form->createView()
    );
}

In this example I misspelled the new User() with news User() , but I have a blank page in my browser. 在这个例子中,我用news User()拼错了new User() news User() ,但我的浏览器中有一个空白页面。 If I do tail in log file I can see the error. 如果我在日志文件中tail ,我可以看到错误。 Instead of Mamp, If i Use the symfony server php app/console server:run , I can see the error in my Browser, but I can't use xdebug in PhpStorm (8.0.2) 而不是Mamp,如果我使用symfony服务器php app/console server:run ,我可以在浏览器中看到错误,但我不能在PhpStorm中使用xdebug(8.0.2)

If you see a blank page it means that error repoting is turned off. 如果您看到空白页面,则表示错误重新报告已关闭。 You can enable it either in php.ini or in your code with the following statement 您可以使用以下语句在php.ini或代码中启用它

error_reporting(E_ALL);
ini_set("display_errors", 1);

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM