Improved Debug functionality.