Description
This new Integrated Terminal is a great feature. I foresee myself using it a lot in the future. That said, I'm wondering if it would be possible to put in a setting that disables the automatic loading of this terminal when opening PowerShell files. Of course you would also need to a way to load it on demand later.
The VSCode startup process has been getting faster and faster in months past and as such I have started using it to quickly view files instead of Notepad++. I will simply right-click and "Open in VSCode" to quickly take a peak at some script file. However, with this new integrated terminal this now complicates things.
I realize that for most people the loading of the user's PowerShell profile probably doesn't take but a couple seconds to load. However, as a system admin for Lync, Exchange, AD and several others, my profile connects to each of those services and imports a session. This process takes considerable time which is fine on most occasions, however when taking a quick look at a file it can be hindrance.
This is further exasperated by the fact that when the PowerShell extension opens the terminal panel, the VSCode integrated terminal which is also PowerShell will also start loading my profile. So each time I go to quickly view a file I have two separate powershell terminals starting up, each taking considerable time to load all of the imported sessions in my profile.
I could just remove the import of the sessions from the vscode specific powershell profile but if I were to do that I would likely never even use it since 99% of all my development is against these remote services and therefore I need these sessions during my development. I could also just ignore this, hit Ctrl + `
to hide the terminal and close out whenever I'm ready. However, while that most likely won't cause an issue to close out while these sessions are in the middle of an import, it can be problematic if you are doing this repeatedly for several files in a row.
This was also an issue for me in the ISE days. Back when I used to use ISE for everything, I had actually written a PowerShell command, Open-ClipboardFile (with alias ofc), that allowed me to copy a file in Windows Explorer and then open that file in my currently open ISE editor (which ran as a different user than my login user). That way I wasn't loading a new instance of ISE (and thus all of my remote sessions) every time I wanted to quickly look at a file.