Azure CLI – you won't have full ability to operate in the Azure environment until you
- install the Azure Developer CLI extension
- Open the command palette by pressing Ctrl+Shift+P or F1.
- Type "Azure Developer CLI(azd):Open Home" and select the command from the list. This pops up a window saying, "This will install or update the Azure Developer CLI. Do you want to continue?". So this appears to want to reinstall the Azure Developer CLI all over again
to install, go to Extensions and type in "Azure Developer CLI"
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)
Azure Functions Core Tools, must have to debug
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…
So, that looks like a dead end. I probably should have started at Azure Function Core Tool Not Installing on VS Code
install
- 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?
chat (need an active subscription for GitHub Copilot and the GitHub Copilot extension installed to use this feature)
- Inline chat – Crtl + I
- Chat view – Ctrl + Alt + i – or chat icon to left (two cartoon balloons, small on top of big)
Command Palette – Ctrl + Alt + P
- 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 (4 squares with square in upper right corner partially detached) 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.codelens
is 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?
- Ctrl + Shift + P to open the Command Palette.
- Type “menu” and select “View: Toggle Menu Bar” from the dropdown
- This should bring back the menu bar at the top of the VS Code window
'npm' is not recognized as a name of a cmdlet, function, script file, or executable program download and install.
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
(often C:\Users\
but usually can get to this by simply opening settings
SQL query, execute – If it try Run → Run without debugging, it returns “You don’t have an extension for debugging SQL. Should we find an SQL extension in the Marketplace?”
Try running query using the Command Palette. Press Ctrl+Shift+P to open the Command Palette, then type MS SQL: Execute Query and press Enter.
terminal integrated scrollback - aka: how many lines back you can see
Fill → Preferences → Settings
Then search for terminal.integrated.scrollback
.
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
Get-PSRepository
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.
and
Ping https://www.powershellgallery.com/api/v2
will return
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
[Net.ServicePointManager]::SecurityProtocol
before running the command to reassign its value above, it might return
Ssl3, Tls
whereas after you run that command to reassign its value above, it will return
Tls12
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