prepares the AppController for the debugger

This should be merged together with the changes in jsbindings: patch attached to this PR, you can apply with `git am jsbindings.patch` - or check my fork of jsbindings.

github is not allowing me to attach a file, will try after the PR