Fix debugger not restoring its window correctly
Remove dead processes when switching to a live one
Fix process change not marking document as dirty