symfony2:kernel.debug始终为false

I use assetic to bundle css and js files together and I've noticed that even in debug mode they are bundled. That should only happen when kernel.debug is false.

So I've tried the following:

original :

 assetic:
   debug:         %kernel.debug%

force to false:

 assetic:
   debug:         false

force to true :

 assetic:
  debug:         true

When I force to false, files are bundled. When I force true, files are not bundled. When I leave %kernel.debug%, files are bundled.

Why is %kernel.debug% equals to false even though in app_dev I've set it to true:

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';
Debug::enable();

 require_once __DIR__.'/../app/AppKernel.php';

 $kernel = new AppKernel('dev', true);

EDIT

assetic:
debug:         %kernel.debug%
use_controller: false
bundles:        [ ]
#java: /usr/bin/java
filters:
    cssrewrite: ~
    uglifyjs2:  
        bin: /usr/bin/uglifyjs
        apply_to: "\.js$"      
    uglifycss:
        bin: /usr/bin/uglifycss
        apply_to: "\.css$"    

I guess youre trying to to dump assets using the assetic:dump command.

In order to avoid the creation of debug files add --no-debug to the command.

you could further execute the command explicitly within the production environment adding --env=prod. So finally ...

app/console assetic:dump --env=prod --no-debug

... will not create the debug files.

Please note that --no-debug does not work in combination with --watch.