Azure function, create – after having installed Azure Tools Extension Pack, go to Workspace (where a bunch of icons that previously didn't display start showing up when you move your mouse there) → 'Create Function' (only shows up as icon that looks like lightning)
Annoyingly, somewhere along the line after I installed various Azure libraries and functions, I lost the ability to debug (F5 key). This error message comes up even though I clearly see “Azure Functions” among the extensions. Disabling it does nothing. After I uninstall it, and try to start debug, I get pop-up: “Could not find the task 'func:host start'” along with a choice to “Debug Anyway” or “Configure Task”. If I choose “Debug Anyway”, it never hits any of my break points. If I choose “Configure Task”, it just pops up a bunch of incomprehensible “Open tasks.json file” to choose from such as:
- Grunt task detection is turned off. Enable grunt task detection…
- Gulp task detection is turned off. Enable gulp task detection…
- Jake task detection is turned off. Enable jake task detection…
- Press Ctrl+Shift+X to open the Extensions window.
- Search for the Azure Tools extension
- Select the Install button.
might encounter error
Error while installing 'Azure Tools' extension. Please check the [log](command:workbench.action.showWindowLog) for more details.
and if you click the “log” link to open log
EBUSY: resource busy or locked, rename
errors. I closed a file I had open and then it worked OK. Also install 'Azure CLI', 'Azure Resource Manager (ARM) Tools' extensions.
Some other extensions appear to be included in the 'Azure CLI' extension. For instance, if you find 'Azure Functions' and try to install, all it gives you area options to disable or uninstall.
backwards scrolling in the terminal, how far? - see terminal integrated scrollback - aka: how many lines back in the terminal can you scroll?
- highlight the code block and hit Shift + Alt + A This brackets the code block with <# at the beginning followed by #> at the end. Doing the same thing again toggles.
- Ctl + k, Ctl + c. This inserts a # in front of each line. Ctl + k, Ctl + u to uncomment same.
extensions – Bring up the Extensions view by clicking on the Extensions icon in the Activity Bar on the side of VS Code or the View: Extensions command (Ctrl+Shift+X).
F8 button stops working. F8 does the same thing as going to the top menu → Terminal → Run Selected Text.
various attempts at various times with different results
- This problem started after I ran Visual Studio Code as a different user. When I went back to my normal user, F8 no longer ran selected code. I went back to VSC as that other user, F8 still worked fine. When I went back to my normal user again, then it worked OK. So far, this only ever worked one time.
- uninstalling the PowerShell module (Ctrl+Shift+X), re-installing, enabling and trusting worked at least once.
- in settings, disabling/set to false
editor.codelensis supposed to have helped. It didn't
how far back can you scroll in the terminal? - see terminal integrated scrollback - aka: how many lines back in the terminal can you scroll?
integrated console - From the Command Palette (Ctrl+Shift+P), use the View: Toggle Integrated Terminal command.
lines you can go back in terminal - see terminal integrated scrollback - aka: how many lines back in the terminal can you scroll?
scroll backwards in the terminal, how far back can you? - see terminal integrated scrollback - aka: how many lines back in the terminal can you scroll?
security, allowed UNC Hosts – open settings (Ctrl+,) find Security.Allowed UNCHosts. No backwards slashes in front or any backwards slashes after the URL showing path info. Just the URL.
or File → Preferences → Settings
settings file location - %APPDATA%\Code\User\settings.json
but usually can get to this by simply opening settings
terminal integrated scrollback - aka: how many lines back you can see
Fill → Preferences → Settings
Then search for
default is 1000.
UNC, load file from fails &ndash see security, allowed UNC Hosts
Usually Visual Studio Code automatically looks for the newest versions of various modules. When you agree to update, it might issue the following command
powershell.exe -NoLogo -NoProfile -Command 'Install-Module -Name PackageManagement -Force -MinimumVersion 1.4.7 -Scope CurrentUser -AllowClobber'
On Windows Server machines, sometimes returns
No match was found for the specified search criteria and module name 'PackageManagement'. Try Get-PSRepository to see all available registered module repositories.
I don't find this so much on Windows 10 PCs. Anyway, following the suggestion from the error message above
will likely return
WARNING: MSG:UnableToDownload https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409 WARNING: Unable to download the list of available providers. Check your internet connection.
Ping request could not find host https://www.powershellgallery.com/api/v2. Please check the name and try again
To fix (from here), run this:
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
if you simply run
before running the command to reassign its value above, it might return
whereas after you run that command to reassign its value above, it will return
curiously, if you close your session and then re-run that same command to find out what security protocol you're running, it'll likely return the old result - as if you'd never run the command to correct. So, it seems this change only persists for your session. Anyway, once you run this command to fix the security protocol, the ping command will still fail, but at least now you can update OK.
word wrap - open settings (Ctrl+,), search for wrap, toggle