简体   繁体   English

如何在Symfony2中自动改进调试

[英]How to automatically improve Debugging in Symfony2

我之前尝试使用Symfony2进行调试并处理缓存是一个很大的难题我正在使用Netbeans和XDebug进行调试,有没有办法以更好的方式自动禁用缓存和调试?

I added this code (based on this official documentation ) in my app_dev.php in order to achieve exactly what I asked: 我在app_dev.php中添加了这段代码(基于这个官方文档 ),以实现我的要求:

Changed: 更改:

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

with: 有:

if( !isset($_COOKIE['XDEBUG_SESSION']) )
    $loader = require_once __DIR__.'/../app/bootstrap.php.cache';
else
    $loader = require_once __DIR__.'/../app/autoload.php';

and

$kernel->loadClassCache();

with

if( !isset($_COOKIE['XDEBUG_SESSION']) )
    $kernel->loadClassCache();

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

相关问题 如何使用phpstorm和xdebug为symfony2设置远程调试 - How to set up remote debugging for symfony2 with phpstorm and xdebug 如何获取有关Symfony2安全系统的更多调试信息? - How can I get more debugging info about the Symfony2 security system? 如何提高powershell中的调试速度 - How to improve speed of debugging in powershell 如何将数据库值加载到symfony2中的表? - How to load database values to the table in symfony2? 有关如何调试Symfony2控制器的良好实践 - A good practice on how to debug a Symfony2 controller symfony2调试:尽管上下文相同,但在访问其他防火墙后面的路由时,用户将断开连接 - symfony2 debugging: user gets disconnected when accessing routes behind other firewall despite same context 如何自动将VS附加到另一个进程进行调试? - How to automatically attach VS to another process for debugging? Symfony2:重定向和Favicon? - Symfony2: Redirecting and Favicon? symfony2 doctrine2:如何调试为什么不调用集合设置器 - symfony2 doctrine2 : how to debug why a collection setter is not called 如何使用自定义数据扩展Symfony2调试工具栏? - How to extend the Symfony2 Debug Toolbar with custom data?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM