For now, I don't know it's a bug or a feature? On CakePHP 2.6 when I try use debug() method from basics.php in any controller I'm getting message:
Application error: called handler method exception 'CakeException' with message 'Headers already sent in /Applications/MAMP/htdocs/cakephp26/lib/Cake/basics.php on line 120' in /Applications/MAMP/htdocs/cakephp26/lib/Cake/Network/CakeResponse.php:523 Stack trace: #0 /Applications/MAMP/htdocs/cakephp26/lib/Cake/Network/CakeResponse.php(419): CakeResponse->_sendHeader('HTTP/1.1 200 OK') #1 /Applications/MAMP/htdocs/cakephp26/lib/Cake/Routing/Dispatcher.php(174): CakeResponse->send() #2 /Applications/MAMP/htdocs/cakephp26/app/webroot/index.php(118): Dispatcher->dispatch(Object(CakeRequest), Object(CakeResponse)) #3 {main}
In earlier versions of CakePHP it was allowed to debug() from other places than views.