Allow use of debug option in resource mocks

I found this really handy, is it ok by you?