Merged in changes to debug*.* code from 9.4 branch. Passes unit tests.