It seems to be that line 128 of /lib/outputrequirementslib.php does this:
$this->yui3loader->filter = YUI_RAW;
Followed by line 164, which does this:
$this->M_yui_loader->filter = ($this->yui3loader->filter == YUI_DEBUG) ? 'debug' : '';
So that the filter is never set to 'debug'; If I change YUI_RAW to YUI_DEBUG on line 128, all is well.
Have I missed some setting, or is this a bug? I was under the impression that the debug versions ought to load automatically when DEBUG_DEVELOPER was set.