Step 1: The database profiler initilizer must be enabled.
Step 2: The doctrine profiler has to be enabled too.
And this is where the doctrine-profiler is set to the entity manager.
Make sure to use the correct service name. See the comments in the commited code for details.