WIP: Tests for #debug

DO NOT MERGE, WIP

Starting a PR, so that you all can track my progress on this effort. Please let me know if I'm heading in the right direction or not.