fix toolbar/pause issues when leaving function debug context for toplevel debug context