I'd add remote debug to separate module. 
so it could be attached to PhpBrowser (and maybe Selenium) and be sued more widely then just in REST