Cib's lua for debugging

#2862 brought up to date and made ready to merge.

Works without problems on my system, behaves as expected as far as I can tell. Since we're now back to breaking shit, it seems like a good time to merge something like this in.