Windows PowerShell ISE freezes on launch every time - how do I diagnose?
Every time I launch PowerShell ISE (x64 or x86), I get this:
It is drawn exactly as shown and immediately unresponsive. The black part at the bottom is within the window boundaries.
PowerShell CLI runs just fine.
I see nothing in Event Viewer apart from a record of the app hanging when I attempt to close it.
I tried downloading the GlobalUserInterface.CompositeFont
font as part of Solution #3 at this issue, but the download link appears to be broken.
I have no pending Windows Updates as of this post. I am running Windows 10 Pro 21H2.
How do I figure out what's going on?
EDIT (2021-01-02T03:32Z): Apparently it's just taking forever to start up. It eventually rendered, 10 minutes later. If Visual Studio 2022 can open in less than 10 seconds, PS ISE has no excuse. What in the heck is going on?
PowerShell ISE was slow attempting to access the recent files list and having the connections repeatedly fail to access a network path that no longer existed. I solved it by deleting this directory:
C:\Users\{username}\AppData\Local\Microsoft_Corporation\powershell_ise.exe_StrongName_lw2v2vm3wmtzzpebq33gybmeoxukb04w
I discovered this by running Sysinternals Process Monitor, filtering by PowerShell_ISE's PID, and looking at the last thing to happen before the rendering stopped. The last thing it did was to read the files in that directory. It then just reported "Thread Exit" for several minutes.
I store most of my files on a NAS, and for some reason had opened one or two files in ISE by IP, rather than through the mapped network drives. ISE was trying to resolve each of the files, and taking a really long time to time out.