Add support for debugging tests

Hi, I have added support for debugging tests, let me know if there is anything that you don't like! 

goeddie