Watch is not working in VSCode, howto fix? - powershell

Some time ago a Watch window stop working in Visual Studio Code. I am using VsCode for Powershell only. Powershell is only one extension that is installed. However, I can see variables in Variables->Auto and when I put the mouse cursor on the variable. Windows with all updates and VScode is the latest version. Pressing "+" in the watch window sometimes allows adding variables sometimes not, but in all cases, the value is empty.
P.S. Start VCsode with local admin rights didn't help.

Related

vscode showing "completion" for previous commands in integrated terminal

I am using vscode v1.74.2.
When I updated vscode about one month ago, this "completion" of commands which i have previous run. I have searched though the settings, however I can't find the name of the feature. What is this featured named or how do I get rid of it?
I tried using pwsh in an external terminal and the "completion" appeared here too. This has nothing to do with vscode 😅. Thanks #perplexyves for noting.
Edit: use right arrow for auto completion.

How can I get Visual Studio Code to reset the IntelliSense engine for Rust?

I am working on two projects, one is a library, the other is a program that uses that library. When I make changes to the library the other window (the program) doesn't see these changes, so I do not get updated IntelliSense. Closing the program that uses the library and reopening it does force an update but I really prefer not having to go that far.
Answering the title directly and not the root issue...
You can reset IntelliSense and all Rust code features by running the "Rust: Restart the Rust server" command from the command palette (Ctrl+Shift+P).
Progress will be indicated in the status bar.
Still a blunt tool but it will ensure you're in a fresh state without having to restart VS Code entirely.

How to turn off the beep on save in Visual Studio Code?

Visual Studio code has a double beep when saving a file that's particularly penetrating when wearing headphones. There doesn't appear to be a setting for it in the settings.
I did find a suggestion that it can be done in PowerShell with:
Set-PSReadlineOption -BellStyle None
but entering this in the terminal window of VS Code returned an ObjectNotFoundError.
Edit: I've discovered the problem is with PowerShell. I have a PowerShell window open to run the Angular 5 website and it's this that is beeping. I discovered this by switching to Visual Studio 2017 to edit the website and that happily beeped away on save too.

Visual Studio Code - Powershell - High CPU and Slow performance switching between Powershell files

I have a fresh installation of Visual Studio Code 1.16.1
I have the following extensions:
Chef Extension for Visual Studio Code 0.6.3
Code Outline 0.0.10
Powershell 1.4.3
Ruby 0.15.0
I try to edit Powershell within VSCode.
Powershell is loaded (Version 5.1)
But every time I switch between one of my open files (In the current test case, an psm1 and psd1) I see a little loading bar at the top of the Explorer sidebar, just below the Explorer text.
While that's going, I can't "Run Selection", Code Outline does not update nor do I have any form of syntax-assistance while writing code UNTIL it is done. Then all of the items you tried to do, happen all at once.
Until I switch windows, everything works as expected. The moment I switch files, it starts "loading/working" again and I have to wait about 30 seconds for it to do it's thing.
I have also tried disabling all extensions (except Powershell) and I see nearly the same behavior. When switching tabs, the loading happens but I don't see the loading bar in the explorer sidebar described above.
I currently do not have a different machine to test this on, working on getting a second machine to rule out the computer.
I am looking into logging a bug but before I do, I wanted to check here.

Using "Visual Studio code" with interactive Powershell window like Powershell ISE

I'm new to Visual Studio code so thanks in advance for the help.
I often use the PowerShell ISE with an interactive PowerShell window. I open it, type a few commands, then run a script (such as opening a PowerShell session with Office 365) and then type a few more commands.
Is there any way to do the same thing with Visual Studio code? I see a way to run scripts and debug them but not have them complete but the PowerShell window still stay around so I can continue working.
Decided to convert to answer, since this is a bit too much for comments:
Go to settings > user settings and change "terminal.integrated.shell.windows" to:
"C:\\WINDOWS\\Sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
Ctrl + Shift + ` opens the terminal. Using the + button on the terminal window you can launch additional powershell instances.
Also there's an extension that allows for launching several different terminals under the same VSCode process (cmd,powershell,bash,etc). Minor nuance, shells are being started with the same permissions VSCode has, but you can re-elevate once inside the shell.
References:
https://code.visualstudio.com/docs/editor/integrated-terminal
https://code.visualstudio.com/docs/customization/userandworkspace
https://github.com/Microsoft/vscode/issues/10893
Edit: but I would say its not really convenient, terminal takes away too much space on the screen (well, unless you have like 2k or 4k display), so I use powershell + vscode.