Fixing long delays when a program crashes while running in the VSCode terminal

Symptom: You’re writing broken code (aren’t we all?) and your program is crashing. When it crashes running under the regular OS/X terminal, you don’t see any problems; it the program crashes and it’s fine.

However, when you do the same thing under VSCode’s integrated terminal, you see a huge delay.

Solution:

launchctl unload -w /System/Library/LaunchAgents/com.apple.ReportCrash.plist

For some reason, crashes in the regular terminal don’t seem to upset ReportCrash, but when they happen in VSCode, ReportCrash takes a tonne of CPU and hangs out for 10-30s. My, totally uninformed guess, is that ReportCrash thinks the crash is related to VSCode and is sampling everything about the whole VSCode instance. The only evidence I have for this is that I find the crash delays don’t seem to happen right after restarting VSCode.