Improved debug framework.