Topic/improved simulator debug

Based on Michael Klement's awesome pull request!