Video: Read Lock or Write Lock? Debug It

Don’t guess which lock your code is running under. You can verify it directly in the debugger.

In this quick example:

  • ProjectActivity runs without a lock
  • AnAction.actionPerformed() runs under a read lock
  • PSI modifications must run on the EDT and under a write lock