Add a very basic debug interface.
Add some very basic resource probe/attach/detach handling.

This allocates and frees the resources appropriately.