Web Profiler not enabled even with Debug and Use web profiler enabled

I am testing PHPMaker 2026 and I cannot get the Symfony Web Profiler to work using the project settings.

I reproduced the issue with:

  • a completely new PHPMaker 2026 project

  • Debug enabled

  • Development environment

  • Use web profiler enabled

  • Web profiler collect parameter name left empty

  • full project regeneration

  • PHPMaker 2026 reinstalled

  • both Laragon and XAMPP tested

Environment:

PHP 8.2.12
Node.js 24.14.1
Symfony 7.4.17
symfony/framework-bundle 7.4.17
symfony/web-profiler-bundle 7.4.17
APP_ENV=dev
APP_DEBUG=true

config/bundles.php correctly contains:

Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true],

However: php bin/console debug:config framework profiler

returns:

enabled: false
collect: true
collect_parameter: null
only_exceptions: false
only_main_requests: false

Also: php bin/console debug:config web_profiler

shows the toolbar disabled, and: php bin/console debug:router | findstr /I "profiler wdt"

returns no _profiler or _wdt routes.

I then noticed that the PHPMaker-generated Kernel.php imports only .php and .yaml configuration files:

$phpFiles = glob($basePath.'.php', $globFlags) ?: [ ] ;
$yamlFiles = glob($basePath.'.yaml', $globFlags) ?: [ ];

As a test, I manually created:


config/packages/dev/web_profiler.yaml
config/routes/dev/web_profiler.yaml

with the standard Symfony profiler configuration.

config/packages/dev/web_profiler.yaml:


framework:
    profiler:
        enabled: true

web_profiler:
    toolbar:
        enabled: true
    intercept_redirects: false

config/routes/dev/web_profiler.yaml:


web_profiler_wdt:
    resource: '@WebProfilerBundle/Resources/config/routing/wdt.php'
    prefix: /_wdt

web_profiler_profiler:
    resource: '@WebProfilerBundle/Resources/config/routing/profiler.php'
    prefix: /_profiler

After clearing the Symfony cache, the Web Profiler works correctly.

So PHP, Symfony and WebProfilerBundle appear to be working correctly. The profiler only starts working after adding these two configuration files manually.

My question is:

Should PHPMaker 2026 generate these profiler configuration/routes files automatically when Debug and Use web profiler are enabled?

Or is there another PHPMaker setting or generation step required?

I would like to avoid manually maintaining these files if PHPMaker is supposed to generate/configure the profiler automatically.

The same behaviour occurs in a brand-new minimal project, so it does not seem related to my existing project configuration.

Thanks.

Yes, PHPMaker template contains those files (.php version) and will be generated if environment is development and Use web profiler is enabled, you may find them under "Other files" in the popup Generate form (if you have not enabled "Clear project folder first"). You may remove those files (and your *.yaml files) in the project folder and try again. And yes, the most important thing is to clear cache so the newly generated files will be used by Symfony.

Thanks, solved.

I had already tried clearing the Symfony cache, deleting the whole project folder, regenerating all files, updating the template and reinstalling PHPMaker, but the profiler configuration was still not generated correctly.

What finally fixed it was very simple:

  1. Set the project environment to Production

  2. Generate the whole project

  3. Change the environment back to Development

  4. Generate the whole project again

  5. Clear the Symfony cache

After doing this, PHPMaker generated the profiler .php configuration files correctly under Other files, and the Symfony Web Profiler started working normally.

So if anyone has APP_ENV=dev and APP_DEBUG=true but framework.profiler.enabled still shows false, try switching to Production, regenerate, then switch back to Development and regenerate again.

after: php bin/console debug:config framework profiler ----> enabled: true

Thanks for pointing me in the right direction.