在PHPStorm中调试Symfony2项目 [英] Debug Symfony2 projects in PHPStorm

查看:120
本文介绍了在PHPStorm中调试Symfony2项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

由于Request::createFromGlobals()方法,我在使用xdebug在PHPStorm中调试symfony2应用程序时遇到问题.所有其他项目调试良好.

I have a problem in debugging symfony2 applications in PHPStorm with xdebug because of Request::createFromGlobals() method. All other project debugs well.

会发生问题,当执行过程满足此方法的调用时,调试器将关闭而不会出现任何错误,并呈现页面.

The problem occurs, when the execution process meets the invocation of this method, the debugger just turns off without any error and the page is rendered.

有人知道如何解决吗?

推荐答案

尝试将app_dev.php更改为:

Try change app_dev.php to:

...
//$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
$loader = require_once __DIR__.'/../app/autoload.php';
require_once __DIR__.'/../app/AppKernel.php';

$kernel = new AppKernel('dev', true);
//$kernel->loadClassCache();
$request = Request::createFromGlobals();
...

这篇关于在PHPStorm中调试Symfony2项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆